首页 开发技术 Java     /    银行取款转账系统(Java编写)

银行取款转账系统(Java编写)

上传者: dalongwangchao | 上传时间:2020/11/9 14:44:46 | 文件大小:132KB | 文件类型:rar
银行取款转账系统(Java编写)
这是用Java编写的一个简单的银行转账系统,包括取款,存款,转账等功能,其中用到了数据库的连接,采用Eclipse编写,包含数据库的设计文件。
非常适合有一定基础的Java初学者使用。
packagecom.gujunjia.bank;/**Tochangethistemplate,chooseTools|Templates*andopenthetemplateintheeditor.*/importjava.sql.*;/****@authorgujunjia*/publicclassDataBase{ staticConnectionconn; staticPreparedStatementst; staticResultSetrs; /** *加载驱动 */ publicstaticvoidloadDriver() { try { Class.forName("com.mysql.jdbc.Driver"); } catch(ClassNotFoundExceptione) { System.out.println("加载驱动失败"); } } /** *创建数据库的连接 * *@paramdatabase *需要访问的数据库的名字 */ publicstaticvoidconnectionDatabase(Stringdatabase) { try { Stringurl="jdbc:mysql://localhost:3306/"+database; Stringusername="root"; Stringpassword="gujunjia"; conn=DriverManager.getConnection(url,username,password); } catch(SQLExceptione) { System.out.println(e.getMessage()); } } /** *关闭数据库连接 */ publicstaticvoidcloseConnection() { if(rs!=null) {//关闭记录集 try { rs.close(); } catch(SQLExceptione) { e.printStackTrace(); } } if(st!=null) {//关闭声明 try { st.close(); } catch(SQLExceptione) { e.printStackTrace(); } } if(conn!=null) {//关闭连接对象 try { conn.close(); } catch(SQLExceptione) { e.printStackTrace(); } } }}packagecom.gujunjia.bank;/**Tochangethistemplate,chooseTools|Templates*andopenthetemplateintheeditor.*/importjava.awt.*;importjava.awt.event.*;importjavax.swing.*;/***本类次要实现整个系统的界面**@authorgujunjia*/publicclassMainFrameextendsJFrameimplementsActionListener,FocusListener{ /** * */ privatestaticfinallongserialVersionUID=1L; publicstaticStringuserId; JTextFielduserIdText; JPasswordFieldpasswordText; JButtonregisterButton; JButtonlogInButton; publicMainFrame() { super("个人银行系统

文件下载

资源详情

[{"title":"(77个子文件132KB)银行取款转账系统(Java编写)","children":[{"title":"TheSystemOfBank","children":[{"title":".project <span style='color:#111;'>391B</span>","children":null,"spread":false},{"title":"bin","children":[{"title":"com","children":[{"title":"gujunjia","children":[{"title":"bank","children":[{"title":"User.class <span style='color:#111;'>1.10KB</span>","children":null,"spread":false},{"title":"DataBase.class <span style='color:#111;'>1.95KB</span>","children":null,"spread":false},{"title":"Register.class <span style='color:#111;'>5.80KB</span>","children":null,"spread":false},{"title":"UserGUI$5.class <span style='color:#111;'>815B</span>","children":null,"spread":false},{"title":"UserGUI$2.class <span style='color:#111;'>814B</span>","children":null,"spread":false},{"title":"Bank.class <span style='color:#111;'>4.44KB</span>","children":null,"spread":false},{"title":"UserGUI.class <span style='color:#111;'>6.35KB</span>","children":null,"spread":false},{"title":"UserGUI$3.class <span style='color:#111;'>1.85KB</span>","children":null,"spread":false},{"title":"Main.class <span style='color:#111;'>439B</span>","children":null,"spread":false},{"title":"UserGUI$1.class <span style='color:#111;'>2.19KB</span>","children":null,"spread":false},{"title":"MainFrame.class <span style='color:#111;'>4.61KB</span>","children":null,"spread":false},{"title":"UserGUI$4.class <span style='color:#111;'>2.67KB</span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"test","children":[{"title":"Test$1.class <span style='color:#111;'>838B</span>","children":null,"spread":false},{"title":"Test.class <span style='color:#111;'>1.27KB</span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"bank.jar <span style='color:#111;'>19.68KB</span>","children":null,"spread":false},{"title":".settings","children":[{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'>629B</span>","children":null,"spread":false}],"spread":true},{"title":"bank.sql <span style='color:#111;'>975B</span>","children":null,"spread":false},{"title":"src","children":[{"title":"com","children":[{"title":"gujunjia","children":[{"title":"bank","children":[{"title":"MainFrame.java <span style='color:#111;'>3.72KB</span>","children":null,"spread":false},{"title":"Bank.java <span style='color:#111;'>5.19KB</span>","children":null,"spread":false},{"title":"UserGUI.java <span style='color:#111;'>7.49KB</span>","children":null,"spread":false},{"title":"Register.java <span style='color:#111;'>5.87KB</span>","children":null,"spread":false},{"title":"Main.java <span style='color:#111;'>354B</span>","children":null,"spread":false},{"title":"User.java <span style='color:#111;'>816B</span>","children":null,"spread":false},{"title":"DataBase.java <span style='color:#111;'>1.46KB</span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"test","children":[{"title":"Test.java <span style='color:#111;'>980B</span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":".classpath <span style='color:#111;'>411B</span>","children":null,"spread":false},{"title":"doc","children":[{"title":"resources","children":[{"title":"inherit.gif <span style='color:#111;'>57B</span>","children":null,"spread":false}],"spread":true},{"title":"stylesheet.css <span style='color:#111;'>1.29KB</span>","children":null,"spread":false},{"title":"allclasses-noframe.html <span style='color:#111;'>1.30KB</span>","children":null,"spread":false},{"title":"overview-frame.html <span style='color:#111;'>1.07KB</span>","children":null,"spread":false},{"title":"allclasses-frame.html <span style='color:#111;'>1.45KB</span>","children":null,"spread":false},{"title":"com","children":[{"title":"gujunjia","children":[{"title":"bank","children":[{"title":"package-use.html <span style='color:#111;'>5.40KB</span>","children":null,"spread":false},{"title":"User.html <span style='color:#111;'>13.13KB</span>","children":null,"spread":false},{"title":"UserGUI.html <span style='color:#111;'>24.40KB</span>","children":null,"spread":false},{"title":"Register.html <span style='color:#111;'>24.74KB</span>","children":null,"spread":false},{"title":"package-summary.html <span style='color:#111;'>7.08KB</span>","children":null,"spread":false},{"title":"class-use","children":[{"title":"User.html <span style='color:#111;'>5.64KB</span>","children":null,"spread":false},{"title":"UserGUI.html <span style='color:#111;'>5.67KB</span>","children":null,"spread":false},{"title":"Register.html <span style='color:#111;'>5.68KB</span>","children":null,"spread":false},{"title":"Bank.html <span style='color:#111;'>5.64KB</span>","children":null,"spread":false},{"title":"MainFrame.html <span style='color:#111;'>5.69KB</span>","children":null,"spread":false},{"title":"Main.html <span style='color:#111;'>5.64KB</span>","children":null,"spread":false},{"title":"DataBase.html <span style='color:#111;'>5.68KB</span>","children":null,"spread":false}],"spread":false},{"title":"package-frame.html <span style='color:#111;'>1.40KB</span>","children":null,"spread":false},{"title":"Bank.html <span style='color:#111;'>14.77KB</span>","children":null,"spread":false},{"title":"MainFrame.html <span style='color:#111;'>24.72KB</span>","children":null,"spread":false},{"title":"Main.html <span style='color:#111;'>9.50KB</span>","children":null,"spread":false},{"title":"package-tree.html <span style='color:#111;'>7.20KB</span>","children":null,"spread":false},{"title":"DataBase.html <span style='color:#111;'>10.71KB</span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"test","children":[{"title":"package-use.html <span style='color:#111;'>5.30KB</span>","children":null,"spread":false},{"title":"package-summary.html <span style='color:#111;'>5.78KB</span>","children":null,"spread":false},{"title":"class-use","children":[{"title":"Test.html <span style='color:#111;'>5.50KB</span>","children":null,"spread":false}],"spread":false},{"title":"package-frame.html <span style='color:#111;'>823B</span>","children":null,"spread":false},{"title":"Test.html <span style='color:#111;'>20.18KB</span>","children":null,"spread":false},{"title":"package-tree.html <span style='color:#111;'>6.10KB</span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"overview-tree.html <span style='color:#111;'>6.89KB</span>","children":null,"spread":false},{"title":"serialized-form.html <span style='color:#111;'>9.76KB</span>","children":null,"spread":false},{"title":"constant-values.html <span style='color:#111;'>5.08KB</span>","children":null,"spread":false},{"title":"index-files","children":[{"title":"index-4.html <span style='color:#111;'>6.77KB</span>","children":null,"spread":false},{"title":"index-1.html <span style='color:#111;'>6.64KB</span>","children":null,"spread":false},{"title":"index-5.html <span style='color:#111;'>6.93KB</span>","children":null,"spread":false},{"title":"index-10.html <span style='color:#111;'>7.00KB</span>","children":null,"spread":false},{"title":"index-12.html <span style='color:#111;'>6.71KB</span>","children":null,"spread":false},{"title":"index-6.html <span style='color:#111;'>8.93KB</span>","children":null,"spread":false},{"title":"index-2.html <span style='color:#111;'>6.32KB</span>","children":null,"spread":false},{"title":"index-9.html <span style='color:#111;'>7.58KB</span>","children":null,"spread":false},{"title":"index-11.html <span style='color:#111;'>7.03KB</span>","children":null,"spread":false},{"title":"index-8.html <span style='color:#111;'>6.13KB</span>","children":null,"spread":false},{"title":"index-13.html <span style='color:#111;'>6.92KB</span>","children":null,"spread":false},{"title":"index-7.html <span style='color:#111;'>6.19KB</span>","children":null,"spread":false},{"title":"index-3.html <span style='color:#111;'>6.63KB</span>","children":null,"spread":false}],"spread":false},{"title":"package-list <span style='color:#111;'>29B</span>","children":null,"spread":false},{"title":"help-doc.html <span style='color:#111;'>8.20KB</span>","children":null,"spread":false},{"title":"deprecated-list.html <span style='color:#111;'>5.04KB</span>","children":null,"spread":false},{"title":"index.html <span style='color:#111;'>1.30KB</span>","children":null,"spread":false},{"title":"overview-summary.html <span style='color:#111;'>5.46KB</span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}]

评论信息

  • xiexieni316:
    谢谢分享,学习了2016-05-17
  • kederukawa:
    不错,对java项目学习有用处2013-09-03
  • yueqingabc123:
    比较简单,但是看了后有所帮助2013-07-04
  • 压心底:
    怎么运行报很多错误啊2013-07-03
  • hxd1124:
    虽然不是特别详细但是一些东西还是帮助了我在做的过程中(・∀・)2012-12-26

免责申明

【好快吧下载】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【好快吧下载】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【好快吧下载】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,8686821#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明