b2=new Button(\ÖØÖÃ\l1=new Label(\ËùÑ¡¿Î³Ì\
box1=new Checkbox(\ÀëÉ¢Êýѧ\box2=new Checkbox(\»ã±àÓïÑÔ\box3=new Checkbox(\ÓïÑÔÉè¼Æ\box4=new Checkbox(\Èí¼þ¹¤³Ì\box5=new Checkbox(\²Ù×÷ϵͳ\box6=new Checkbox(\Âí¿Ë˼ÕþÖÎѧ\box1.addItemListener(this); box2.addItemListener(this); box3.addItemListener(this); box4.addItemListener(this); box5.addItemListener(this); box6.addItemListener(this); add(l2); add(t1); add(l3); add(t2); add(b1); add(b2); add(l1); add(box1);
add(box2); add(box3); add(box4); add(box5); add(box6); add(t);
b1.addActionListener(this); b2.addActionListener(this); setSize(500,500); setVisible(true);
addWindowListener(new WindowAdapter() { } ); validate();}
public void windowClosing(WindowEvent e) {System.exit(0);}
public void itemStateChanged(ItemEvent e)
{ }
public void actionPerformed(ActionEvent a) {
if(a.getSource()==b1) {
Connection con; Statement sql; ResultSet rs;
String number1,name1,lesson1, recode,insertStr; try{ }
catch(ClassNotFoundException g){
Class.forName(\
Checkbox box=(Checkbox)e.getSource(); if(box.getState()) {
int n=t.getCaretPosition(); t.insert(box.getLabel(),n);}
else
{t.setText(\
}
System.out.println(\
try{
con=DriverManager.getConnection(\
sql=con.createStatement(); number1=t1.getText(); name1=t2.getText(); lesson1=t.getText();
recode=\
+\
insertStr=\
values\
sql.executeUpdate(insertStr);
con.close(); dispose();
RuanJian rj=new RuanJian(\²éѯ´°¿Ú\ }
catch(SQLException h)
{System.out.println(h);} }