}
}
}
e1.printStackTrace();
} catch (SQLException e1) {
});
button.setText(\修改\);
button.setBounds(53, 237, 106, 28); getContentPane().add(button);
final JButton button_1 = new JButton();
button_1.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) { }
xueshengxinxi c=new xueshengxinxi(); c.setVisible(true); dispose();
});
button_1.setText(\返回\);
button_1.setBounds(181, 237, 106, 28); getContentPane().add(button_1);
final JButton button_2 = new JButton();
button_2.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
String sql=\学生信息 where 学号='\+t1.getText()+\;
try {
sa=cn.createStatement(); re=sa.executeQuery(sql); if(re.next()) {
t1.setText(\+re.getString(1)); t2.setText(\+re.getString(2)); t3.setText(\+re.getString(3)); t4.setText(\+re.getString(4)); t5.setText(\+re.getString(5));
}
}
} else {
JOptionPane.showMessageDialog(null, \失败\); }
// TODO Auto-generated catch block e1.printStackTrace();
} catch (SQLException e1) {
});
button_2.setText(\快速显示\);
button_2.setBounds(212, 35, 106, 28); getContentPane().add(button_2);
JLabel label_5 = new JLabel(\); label_5.setIcon(new
ImageIcon(\\\\\14.jpg\)); }
}
label_5.setBounds(0, 0, 492, 341); getContentPane().add(label_5); //
public kechengxinxi() { try {
Class.forName( \ ); cn=
super();
setTitle(\); getContentPane().setLayout(null); setBounds(100, 100, 500, 375);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
String su,sp; su=\; sp=\;
DriverManager.getConnection( \eName=学生成绩管理系统\ , su, sp);
} catch (ClassNotFoundException e1) { }
final JButton button = new JButton();
button.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
t1 = new JTextField();
t1.setBounds(95, 28, 87, 22); getContentPane().add(t1);
final JLabel label = new JLabel(); label.setText(\学号\);
label.setBounds(23, 30, 66, 18); getContentPane().add(label);
e.printStackTrace(); e1.printStackTrace(); } catch (SQLException e) {
String sql=\课程信息 where 学号='\+t1.getText()+\;
try {
sa=cn.createStatement(); re=sa.executeQuery(sql);
if(re.next()) {
oo.setText(\学号:\+re.getString(1)+\课程名称:
\+re.getString(2)+\任教教师:\+re.getString(3)+\课时:\+re.getString(4)+\教学模式:\+re.getString(5));
final JButton button_1 = new JButton();
button_1.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
}
}
} else {
JOptionPane.showMessageDialog(null, \失败\); }
// TODO Auto-generated catch block e1.printStackTrace();
} catch (SQLException e1) {
});
button.setText(\查询\);
button.setBounds(188, 25, 66, 28); getContentPane().add(button);
String sql=\课程信息 where 学号='\+t1.getText()+\;
try {
sa=cn.createStatement(); s=sa.executeUpdate(sql); if(s==1) { } else {
JOptionPane.showMessageDialog(null, \失败\); }
e1.printStackTrace();
JOptionPane.showMessageDialog(null, \删除成功\);
} catch (SQLException e1) {
}
}
});
button_1.setText(\删除\);
button_1.setBounds(260, 25, 66, 28); getContentPane().add(button_1); oo = new JTextArea();
oo.setBounds(23, 83, 354, 231); getContentPane().add(oo);
final JButton button_2 = new JButton();
button_2.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { kechengxinxi1 c=new kechengxinxi1(); c.setVisible(true); dispose();
}
});
button_2.setText(\增加\);
button_2.setBounds(331, 25, 66, 28); getContentPane().add(button_2);
final JButton button_2_1 = new JButton();
button_2_1.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { kechengxinxi2 c=new kechengxinxi2(); c.setVisible(true); dispose();
}
});
button_2_1.setText(\修改\);
button_2_1.setBounds(403, 25, 66, 28); getContentPane().add(button_2_1); final JButton button_3 = new JButton();
button_3.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { shouye c=new shouye();
c.setVisible(true);