资源描述:
《java版学籍管理系统源代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Java版学籍管理系统源代码package学籍管理系统;/**Tochangethistemplate,chooseTools
2、Templates*andopenthetemplateintheeditor.*//****@authorAdministrator*/importjava.awt.*;importt.*;importjavax.swing.*;importjava.io.*;importjava.util.*;publicclassDeleteextendsJPanelimplement
3、sActionListener/****/privatestaticfinallongserialVersionUID1L;Hashtable基本信息表null;JTextField学号,姓名,专业,年级,出生;JRadioButton男,女;JButton删除;ButtonGroupgroupnull;FileInputStreaminOnenull;ObjectInputStreaminTwonull;FileOutputStreamoutOnenull;ObjectOutputStreamout
4、Twonull;Filefilenull;publicDeleteFilefilethis.filefile;学号newJTextField10;删除newJButton"删除";学号.addActionListenerthis;删除.addActionListenerthis;姓名newJTextField10;姓名.setEditablefalse;专业newJTextField10;专业.setEditablefalse;年级newJTextField10;年级.setEditablefalse
5、;出生newJTextField10;出生.setEditablefalse;男newJRadioButton"男",false;女newJRadioButton"女",false;groupnewButtonGroup;group.add男;group.add女;Boxbox1Box.createHorizontalBox;box1.addnewJLabel"输入要删除的学号:",JLabel.CENTER;box1.add学号;box1.add删除;Boxbox2Box.createHorizon
6、talBox;box2.addnewJLabel"姓名:",JLabel.CENTER;box2.add姓名;Boxbox3Box.createHorizontalBox;box3.addnewJLabel"性别:",JLabel.CENTER;box3.add男;box3.add女;Boxbox4Box.createHorizontalBox;box4.addnewJLabel"专业:",JLabel.CENTER;box4.add专业;Boxbox5Box.createHorizontalBox;
7、box5.addnewJLabel"年级:",JLabel.CENTER;box5.add年级;Boxbox6Box.createHorizontalBox;box6.addnewJLabel"出生:",JLabel.CENTER;box6.add出生;BoxboxHBox.createVerticalBox;boxH.addbox1;boxH.addbox2;boxH.addbox3;boxH.addbox4;boxH.addbox5;boxH.addbox6;boxH.addBox.createV
8、erticalGlue;JPanelpCenternewJPanel;pCenter.addboxH;setLayoutnewBorderLayout;addpCenter,BorderLayout.CENTER;validate;publicvoidactionPerformedActionEventeife.getSource删除
9、
10、e.getSource学号Stringnumber"";number学号.getText;ifnumber.length0tryinOnenewFileInputSt
11、reamfile;inTwonewObjectInputStreaminOne;基本信息表HashtableinTwo.readObject;inOne.close;inTwo.close;catchExceptioneeif基本信息表.containsKeynumberStudentstuStudent基本信息表.getnumber;姓名.setTextstu.getName;专业.setTextstu.getDisciping;年级.setTexts