学生管理系统代码.doc
上传人:yy****24 上传时间:2024-09-10 格式:DOC 页数:24 大小:163KB 金币:16 举报 版权申诉
预览加载中,请您耐心等待几秒...

学生管理系统代码.doc

学生管理系统代码.doc

预览

免费试读已结束,剩余 14 页请下载文档后查看

16 金币

下载此文档

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

importjava.awt.*;importjavax.swing.*;importjava.awt.Font;importjavax.swing.ButtonGroup;importjavax.swing.JButton;importjavax.swing.JFrame;importjavax.swing.JLabel;importjavax.swing.JRadioButton;importjavax.swing.JScrollPane;importjavax.swing.JTextArea;importjavax.swing.JTextField;importjavax.swing.JPasswordField;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.awt.event.WindowAdapter;importjava.awt.event.WindowEvent;importjava.sql.Connection;importjava.sql.DriverManager;importjava.sql.ResultSet;importjava.sql.Statement;importjavax.swing.JOptionPane;classLoginCheck{privateStringuser;privateStringpassWord;publicLoginCheck(Stringuser,StringpassWord){this.user=user;this.passWord=passWord;}publicbooleancheck(){if("zhouzhiqiang".equals(user)&&"123456".equals(passWord)){returntrue;}else{returnfalse;}}}classActionHandle1{privateJFrameframe=newJFrame("登录界面");privateJButtonsubmit=newJButton("登录");privateJButtonexit=newJButton("退出");privateJLabeluser=newJLabel("用户名:");privateJLabelpassWord=newJLabel("密码:");privateJLabelinfo=newJLabel("学生管理系统");privateJTextFielduserText=newJTextField();privateJPasswordFieldpassText=newJPasswordField();publicActionHandle1(){Fontfnt=newFont("Serief",Font.BOLD,20);info.setFont(fnt);submit.addActionListener(newActionListener(){publicvoidactionPerformed(ActionEventarg0){if(arg0.getSource()==submit){Stringuser=userText.getText();Stringpassword=newString(passText.getPassword());LoginChecklog=newLoginCheck(user,password);if(log.check()){newActionHandle2().setMenuBar();}else{JOptionPane.showMessageDialog(null,"输入的用户名或密码有误!","警告",JOptionPane.WARNING_MESSAGE);userText.setText("");passText.setText("");}}}});exit.addActionListener(newActionListener(){publicvoidactionPerformed(ActionEventarg0){if(arg0.getSource()==exit){