stu.setName(sname);.........................................................................................................................XXXVIII
stu.setSex(sex);.................................................................................................................................XXXVIII
stu.setAge(age);................................................................................................................................XXXVIII
stu.setClassName(className);.........................................................................................................XXXVIII
stu.setDepart(depart);.......................................................................................................................XXXVIII
return stu;..........................................................................................................................................XXXVIII
}.........................................................................................................................................................XXXVIII
public static void main(String[] args) {............................................................................................XXXVIII
EditFrame editstu = new EditFrame();.............................................................................................XXXVIII
editstu.init();......................................................................................................................................XXXVIII
}.........................................................................................................................................................XXXVIII
// 修改监听器...................................................................................................................................XXXVIII
class editAction implements ActionListener {.................................................................................XXXVIII
public void actionPerformed(ActionEvent e) {................................................................................XXXVIII
Student stu = getStudent();..................................................................................................................XXXIX
boolean b = studao.edit(stu.getSno(), stu.getName(), stu.getSex(),...................................................XXXIX
stu.getAge(), stu.getClassName(), stu.getDepart(), conn);.................................................................XXXIX
if (b) {..................................................................................................................................................XXXIX
JOptionPane.showMessageDialog(null, "数据修改成功!");..........................................................XXXIX
} else {.................................................................................................................................................XXXIX
JOptionPane.showMessageDialog(null, "数据修改失败!");..........................................................XXXIX
}...........................................................................................................................................................XXXIX
}...........................................................................................................................................................XXXIX
}...........................................................................................................................................................XXXIX
..............................................................................................................................................................XXXIX
class BackAction implements ActionListener{..................................................................................XXXIX
public void actionPerformed(ActionEvent e) {..................................................................................XXXIX
MainFrame m=new MainFrame ();.....................................................................................................XXXIX
m.init();................................................................................................................................................XXXIX
..............................................................................................................................................................XXXIX
}...........................................................................................................................................................XXXIX
..............................................................................................................................................................XXXIX
}...........................................................................................................................................................XXXIX
}............................................................................................................................................................XXXIX
附录代码