首页下载资源后端Java课程设计火车票系统管理源码

ZIPJava课程设计火车票系统管理源码

m0_5457043595.55KB需要积分:1

资源文件列表:

火车票系统管理代码.zip 大约有93个文件
  1. 火车票系统管理代码/.idea/
  2. 火车票系统管理代码/.idea/.gitignore 50B
  3. 火车票系统管理代码/.idea/.name 13B
  4. 火车票系统管理代码/.idea/misc.xml 276B
  5. 火车票系统管理代码/.idea/modules.xml 269B
  6. 火车票系统管理代码/.idea/uiDesigner.xml 8.71KB
  7. 火车票系统管理代码/.idea/workspace.xml 3.6KB
  8. 火车票系统管理代码/out/
  9. 火车票系统管理代码/out/production/
  10. 火车票系统管理代码/out/production/TrainSystem/
  11. 火车票系统管理代码/out/production/TrainSystem/TraSystem/
  12. 火车票系统管理代码/out/production/TrainSystem/TraSystem/.idea/
  13. 火车票系统管理代码/out/production/TrainSystem/TraSystem/.idea/.gitignore 50B
  14. 火车票系统管理代码/out/production/TrainSystem/TraSystem/.idea/.name 11B
  15. 火车票系统管理代码/out/production/TrainSystem/TraSystem/.idea/misc.xml 177B
  16. 火车票系统管理代码/out/production/TrainSystem/TraSystem/.idea/modules.xml 265B
  17. 火车票系统管理代码/out/production/TrainSystem/TraSystem/.idea/workspace.xml 1.57KB
  18. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Access$1.class 773B
  19. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Access$2.class 1.69KB
  20. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Access$3.class 810B
  21. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Access$4.class 1.69KB
  22. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Access.class 4.52KB
  23. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Add$AddFrame$1.class 1.65KB
  24. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Add$AddFrame.class 3.01KB
  25. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Add.class 2.73KB
  26. 火车票系统管理代码/out/production/TrainSystem/TraSystem/AddFrame$1.class 1.62KB
  27. 火车票系统管理代码/out/production/TrainSystem/TraSystem/AddFrame.class 2.97KB
  28. 火车票系统管理代码/out/production/TrainSystem/TraSystem/AllTrain.class 3.54KB
  29. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Erase.class 3.12KB
  30. 火车票系统管理代码/out/production/TrainSystem/TraSystem/EraseFrame$1.class 907B
  31. 火车票系统管理代码/out/production/TrainSystem/TraSystem/EraseFrame.class 1.87KB
  32. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Find1$1.class 961B
  33. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Find1.class 4.8KB
  34. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Find2$1.class 943B
  35. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Find2.class 4.67KB
  36. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Purchase.class 3.45KB
  37. 火车票系统管理代码/out/production/TrainSystem/TraSystem/PurchaseFrame$1.class 1.03KB
  38. 火车票系统管理代码/out/production/TrainSystem/TraSystem/PurchaseFrame.class 1.94KB
  39. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Refund.class 3.36KB
  40. 火车票系统管理代码/out/production/TrainSystem/TraSystem/RefundFrame$1.class 1.01KB
  41. 火车票系统管理代码/out/production/TrainSystem/TraSystem/RefundFrame.class 1.97KB
  42. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Register.class 2.6KB
  43. 火车票系统管理代码/out/production/TrainSystem/TraSystem/RegisterFrame$1.class 1.29KB
  44. 火车票系统管理代码/out/production/TrainSystem/TraSystem/RegisterFrame.class 2.09KB
  45. 火车票系统管理代码/out/production/TrainSystem/TraSystem/SaMainFrame$1.class 1.02KB
  46. 火车票系统管理代码/out/production/TrainSystem/TraSystem/SaMainFrame$2.class 822B
  47. 火车票系统管理代码/out/production/TrainSystem/TraSystem/SaMainFrame$3.class 856B
  48. 火车票系统管理代码/out/production/TrainSystem/TraSystem/SaMainFrame$4.class 862B
  49. 火车票系统管理代码/out/production/TrainSystem/TraSystem/SaMainFrame$5.class 822B
  50. 火车票系统管理代码/out/production/TrainSystem/TraSystem/SaMainFrame$6.class 860B
  51. 火车票系统管理代码/out/production/TrainSystem/TraSystem/SaMainFrame.class 2.83KB
  52. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Ticket.class 3.96KB
  53. 火车票系统管理代码/out/production/TrainSystem/TraSystem/TraSystem.iml 455B
  54. 火车票系统管理代码/out/production/TrainSystem/TraSystem/Update.class 2.54KB
  55. 火车票系统管理代码/out/production/TrainSystem/TraSystem/UpdateFrame$1.class 1.33KB
  56. 火车票系统管理代码/out/production/TrainSystem/TraSystem/UpdateFrame.class 2.5KB
  57. 火车票系统管理代码/out/production/TrainSystem/TraSystem/UserInfo.class 3.51KB
  58. 火车票系统管理代码/out/production/TrainSystem/TraSystem/UserMainFrame$1.class 852B
  59. 火车票系统管理代码/out/production/TrainSystem/TraSystem/UserMainFrame$2.class 971B
  60. 火车票系统管理代码/out/production/TrainSystem/TraSystem/UserMainFrame$3.class 1.03KB
  61. 火车票系统管理代码/out/production/TrainSystem/TraSystem/UserMainFrame$4.class 1.1KB
  62. 火车票系统管理代码/out/production/TrainSystem/TraSystem/UserMainFrame$5.class 1.03KB
  63. 火车票系统管理代码/out/production/TrainSystem/TraSystem/UserMainFrame.class 3.22KB
  64. 火车票系统管理代码/src/
  65. 火车票系统管理代码/src/TraSystem/
  66. 火车票系统管理代码/src/TraSystem/.idea/
  67. 火车票系统管理代码/src/TraSystem/.idea/.gitignore 50B
  68. 火车票系统管理代码/src/TraSystem/.idea/.name 11B
  69. 火车票系统管理代码/src/TraSystem/.idea/misc.xml 177B
  70. 火车票系统管理代码/src/TraSystem/.idea/modules.xml 265B
  71. 火车票系统管理代码/src/TraSystem/.idea/workspace.xml 1.57KB
  72. 火车票系统管理代码/src/TraSystem/Access.java 7.32KB
  73. 火车票系统管理代码/src/TraSystem/Add.java 6.45KB
  74. 火车票系统管理代码/src/TraSystem/AddFrame.java 4.74KB
  75. 火车票系统管理代码/src/TraSystem/AllTrain.java 2.79KB
  76. 火车票系统管理代码/src/TraSystem/Erase.java 2.7KB
  77. 火车票系统管理代码/src/TraSystem/EraseFrame.java 1.85KB
  78. 火车票系统管理代码/src/TraSystem/Find1.java 3.77KB
  79. 火车票系统管理代码/src/TraSystem/Find2.java 3.7KB
  80. 火车票系统管理代码/src/TraSystem/Purchase.java 3.02KB
  81. 火车票系统管理代码/src/TraSystem/PurchaseFrame.java 1.85KB
  82. 火车票系统管理代码/src/TraSystem/Refund.java 2.92KB
  83. 火车票系统管理代码/src/TraSystem/RefundFrame.java 1.93KB
  84. 火车票系统管理代码/src/TraSystem/Register.java 1.79KB
  85. 火车票系统管理代码/src/TraSystem/RegisterFrame.java 2.8KB
  86. 火车票系统管理代码/src/TraSystem/SaMainFrame.java 4.11KB
  87. 火车票系统管理代码/src/TraSystem/Ticket.java 2.79KB
  88. 火车票系统管理代码/src/TraSystem/TraSystem.iml 455B
  89. 火车票系统管理代码/src/TraSystem/Update.java 1.76KB
  90. 火车票系统管理代码/src/TraSystem/UpdateFrame.java 3.33KB
  91. 火车票系统管理代码/src/TraSystem/UserInfo.java 2.77KB
  92. 火车票系统管理代码/src/TraSystem/UserMainFrame.java 4.51KB
  93. 火车票系统管理代码/TrainSystem.iml 433B

资源介绍:

Java课程设计火车票系统管理源码
// // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) // package TraSystem; import java.awt.Component; import java.awt.EventQueue; import java.awt.Font; import java.awt.LayoutManager; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JTextField; import javax.swing.border.EmptyBorder; public class Access extends JFrame { private static final long serialVersionUID = 1L; private JPanel contentPane; private JTextField textField; private JPasswordField passwordField; public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { Access frame = new Access(); frame.setVisible(true); frame.setResizable(false); } catch (Exception var2) { var2.printStackTrace(); } } }); } public Access() { this.setTitle("欢迎使用火车售票系统!"); this.setDefaultCloseOperation(3); this.setBounds(600, 300, 450, 355); this.contentPane = new JPanel(); this.contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); this.setContentPane(this.contentPane); JLabel label = new JLabel("用户登录"); label.setBounds(148, 30, 120, 40); label.setFont(new Font("微软雅黑", 1, 30)); JLabel lblNewLabel = new JLabel("用户名"); lblNewLabel.setBounds(59, 99, 45, 18); JLabel lblNewLabel_1 = new JLabel("密码"); lblNewLabel_1.setBounds(59, 181, 30, 18); this.textField = new JTextField(); this.textField.setBounds(127, 96, 165, 24); this.textField.setColumns(10); this.passwordField = new JPasswordField(); this.passwordField.setBounds(127, 178, 165, 24); JButton LoginInButton = new JButton("登陆"); LoginInButton.setBounds(127, 251, 70, 29); LoginInButton.setFont(new Font("微软雅黑", 1, 15)); LoginInButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String user = Access.this.textField.getText(); String pass = new String(Access.this.passwordField.getPassword()); try { boolean com = Access.this.UserLoginIn(user, pass); if (com) { JOptionPane.showMessageDialog((Component)null, "用户登录成功!"); UserMainFrame umf = new UserMainFrame(user); umf.setVisible(true); umf.setResizable(false); Access.this.dispose(); } else { JOptionPane.showMessageDialog((Component)null, "用户登录失败!"); } } catch (Exception var6) { var6.printStackTrace(); } } }); JButton RegisterButton = new JButton("注册"); RegisterButton.setBounds(229, 251, 70, 29); RegisterButton.setFont(new Font("微软雅黑", 1, 15)); RegisterButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { RegisterFrame rf = new RegisterFrame(); rf.setVisible(true); rf.setResizable(false); } }); JButton SaLoginInButton = new JButton("管理员登陆"); SaLoginInButton.setBounds(306, 175, 112, 29); SaLoginInButton.setFont(new Font("微软雅黑", 1, 15)); SaLoginInButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { String user = Access.this.textField.getText(); String pass = new String(Access.this.passwordField.getPassword()); try { boolean com = Access.this.SaLoginIn(user, pass); if (com) { JOptionPane.showMessageDialog((Component)null, "管理员登录成功!"); SaMainFrame smf = new SaMainFrame(user); smf.setVisible(true); smf.setResizable(false); Access.this.dispose(); } else { JOptionPane.showMessageDialog((Component)null, "管理员登录失败!"); } } catch (Exception var6) { var6.printStackTrace(); } } }); this.contentPane.setLayout((LayoutManager)null); this.contentPane.add(lblNewLabel); this.contentPane.add(lblNewLabel_1); this.contentPane.add(this.passwordField); this.contentPane.add(this.textField); this.contentPane.add(LoginInButton); this.contentPane.add(RegisterButton); this.contentPane.add(SaLoginInButton); this.contentPane.add(label); } boolean UserLoginIn(String accountT, String passwordT) throws Exception { Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql://localhost:3306/火车票售票系统?useSSL = false&useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC"; String username = "root"; String passwd = "root"; Connection conn = DriverManager.getConnection(url, username, passwd); Statement stmt = conn.createStatement(); String sql = "SELECT * FROM 用户信息"; ResultSet rs = stmt.executeQuery(sql); String account; String password; do { if (!rs.next()) { return false; } account = rs.getString(1); password = rs.getString(2); } while(!account.equals(accountT) || !password.equals(passwordT)); return true; } boolean SaLoginIn(String saaccountT, String passwordT) throws Exception { Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql://localhost:3306/火车票售票系统?useSSL = false&useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC"; String username = "root"; String passwd = "root"; Connection conn = DriverManager.getConnection(url, username, passwd); Statement stmt = conn.createStatement(); String sql = "SELECT * FROM 管理员信息"; ResultSet rs = stmt.executeQuery(sql); String saaccount; String password; do { if (!rs.next()) { return false; } saaccount = rs.getString(1); password = rs.getString(2); } while(!saaccount.equals(saaccountT) || !password.equals(passwordT)); return true; } }
100+评论
captcha