没有合适的资源?快使用搜索试试~ 我知道了~
Java版学籍管理系统源代码.doc
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 98 浏览量
2022-06-10
07:22:05
上传
评论
收藏 94KB DOC 举报
温馨提示
试读
41页
Java版学籍管理系统源代码
资源推荐
资源详情
资源评论
Java 版学籍管理系统源代码
package 学籍管理系统;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Administrator
*/
import java.awt.*;
import t.*;
import javax.swing.*;
import java.io.*;
import java.util.*;
public class Delete extends JPanel implements ActionListener
/**
*
*/
private static %nal long serialVersionUID 1L;
Hashtable 基本信息表 null;
JTextField 学号,姓名,专业,年级,出生;
JRadioButton 男,女;
JButton 删除;
ButtonGroup group null;
FileInputStream inOne null;
ObjectInputStream inTwo null;
FileOutputStream outOne null;
ObjectOutputStream outTwo null;
File %le null;
public Delete File %le
this.%le %le;
学号 new JTextField 10 ;
删除 new JButton "删除" ;
学号.addActionListener this ;
删除.addActionListener this ;
姓名 new JTextField 10 ;
姓名.setEditable false ;
专业 new JTextField 10 ;
专业.setEditable false ;
年级 new JTextField 10 ;
年级.setEditable false ;
出生 new JTextField 10 ;
出生.setEditable false ;
男 new JRadioButton "男",false ;
女 new JRadioButton "女",false ;
group new ButtonGroup ;
group.add 男 ;
group.add 女 ;
Box box1 Box.createHorizontalBox ;
box1.add new JLabel "输入要删除的学号:",JLabel.CENTER ;
box1.add 学号 ;
box1.add 删除 ;
Box box2 Box.createHorizontalBox ;
box2.add new JLabel "姓名:",JLabel.CENTER ;
box2.add 姓名 ;
Box box3 Box.createHorizontalBox ;
box3.add new JLabel "性别:",JLabel.CENTER ;
box3.add 男 ;
box3.add 女 ;
Box box4 Box.createHorizontalBox ;
box4.add new JLabel "专业:",JLabel.CENTER ;
box4.add 专业 ;
Box box5 Box.createHorizontalBox ;
box5.add new JLabel "年级:",JLabel.CENTER ;
box5.add 年级 ;
Box box6 Box.createHorizontalBox ;
box6.add new JLabel "出生:",JLabel.CENTER ;
box6.add 出生 ;
Box boxH Box.createVerticalBox ;
boxH.add box1 ;
boxH.add box2 ;
boxH.add box3 ;
boxH.add box4 ;
boxH.add box5 ;
boxH.add box6 ;
boxH.add Box.createVerticalGlue ;
JPanel pCenter new JPanel ;
pCenter.add boxH ;
setLayout new BorderLayout ;
add pCenter,BorderLayout.CENTER ;
validate ;
public void actionPerformed ActionEvent e
if e.getSource 删除||e.getSource 学号
String number "";
number 学号.getText ;
if number.length 0
try
inOne new FileInputStream %le ;
inTwo new ObjectInputStream inOne ;
基本信息表 Hashtable inTwo.readObject ;
inOne.close ;
inTwo.close ;
catch Exception ee
if 基本信息表.containsKey number
Student stu Student 基本信息表.get number ;
姓名.setText stu.getName ;
专业.setText stu.getDisciping ;
年级.setText stu.getGrade ;
出生.setText stu.getBorth ;
if stu.getSex .equals "男"
剩余40页未读,继续阅读
资源评论
oligaga
- 粉丝: 52
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功