该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.util.*;
public class StudentSituation extends JPanel implements ActionListener
{
Hashtable 基本信息表=null;
JTextField 学号,姓名,专业,年级,出生;
JRadioButton 男,女;
Student   学生=null;
ButtonGroup group=null;
JButton 录入,重置;
FileInputStream inOne=null;
ObjectInputStream inTwo=null;
FileOutputStream outOne=null;
ObjectOutputStream outTwo=null;
File file=null;
public StudentSituation(File file)
{
this.file=file;
学号=new JTextField(10);
姓名=new JTextField(10);
专业=new JTextField(10);
年级=new JTextField(10);
出生=new JTextField(10);
group=new ButtonGroup();
男=new JRadioButton("男",true);
女=new JRadioButton("女",false);
group.add(男);
group.add(女);
录入=new JButton("录入");
重置=new JButton("重置");
录入.addActionListener(this);
重置.addActionListener(this);
Box box1=Box.createHorizontalBox();
box1.add(new JLabel("学号:",JLabel.CENTER));
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();