录入=new JButton("录入"); 查询=new JButton("查询");删除=new JButton("删除"); 修改=new JButton("修改");显示=new JButton("显示");录入.addActionListener(new InputAct());查询.addActionListener(new InquestAct()); 修改.addActionListener(new ModifyAct());删除.addActionListener(new DeleteAct());显示.addActionListener(new ShowAct()); 修改.setEnabled(false); p1=new JPanel(); p1.add(new JLabel("学号:",JLabel.CENTER)); p1.add(学号); p2=new JPanel(); p2.add(new JLabel("姓名:",JLabel.CENTER)); p2.add(姓名); p3=new JPanel(); p3.add(new JLabel("性别:",JLabel.CENTER)); p3.add(男); p3.add(女); p4=new JPanel(); p4.add(new JLabel("专业:",JLabel.CENTER)); p4.add(专业); p5=new JPanel(); p5.add(new JLabel("年级:",JLabel.CENTER)); p5.add(年级); p6=new JPanel(); p6.add(new JLabel("出生:",JLabel.CENTER)); p6.add(出生); pv=new JPanel(); pv.setLayout(new GridLayout(6,1)); pv.add(p1); pv.add(p2); pv.add(p3); pv.add(p4); pv.add(p5); pv.add(p6); ph=new JPanel(); ph.add(录入); ph.add(查询); ph.add(修改); ph.add(删除); ph.add(显示); file=new File("学生信息.txt"); 学生散列表=new Hashtable(); if(!file.exists()){ try{ FileOutputStream out=new FileOutputStream(file); ObjectOutputStream objectOut=new ObjectOutputStream(out); objectOut.writeObject(学生散列表); objectOut.close(); out.close(); } catch(IOException e){} } Container con=getContentPane(); con.setLayout(new BorderLayout()); con.add(lb, BorderLayout.WEST); con.add(pv, BorderLayout.CENTER); con.add(ph, BorderLayout.SOUTH); setDefaultCloseOperation(EXIT_ON_CLOSE); setBounds(100,100,600,300); setVisible(true); Statement stmt; ResultSet rs; } public static void main(String[] args) {StudentManager ff=new StudentManag
1