学生成绩管理系统 - java课程设计报告(3)

2020-02-21 00:21

getContentPane().add(button_1); ta = new JTextArea();

ta.setBounds(23, 83, 354, 231); getContentPane().add(ta);

final JButton button_2 = new JButton();

button_2.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { xueshengxinxi1 c=new xueshengxinxi1(); 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) { xueshengxinxi2 c=new xueshengxinxi2();

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); dispose();

}

});

final JButton button_1 = new JButton();

button_1.addActionListener(new ActionListener() {

public void actionPerformed(final ActionEvent e) {

String sql=\学生信息

values('\+t1.getText()+\+t2.getText()+\+t3.getText()+\+t4.getText()+\+t5.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(105, 258, 106, 28); getContentPane().add(button_1); final JButton button = new JButton();

button.addActionListener(new ActionListener() {

public void actionPerformed(final ActionEvent e) { }

xueshengxinxi c=new xueshengxinxi(); c.setVisible(true); dispose();

});

button.setText(\返回\);

button.setBounds(233, 258, 106, 28); getContentPane().add(button);

JLabel label_5 = new JLabel(\); label_5.setIcon(new

ImageIcon(\\\\\12.jpg\));

label_5.setBounds(0, 0, 492, 341); getContentPane().add(label_5); //

public xueshengxinxi2() {

super();

setTitle(\); getContentPane().setLayout(null); setBounds(100, 100, 500, 375);

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); String su,sp; su=\; sp=\;

try {

Class.forName( \ ); cn=

DriverManager.getConnection( \eName=学生成绩管理系统\ , su, sp);

} catch (ClassNotFoundException e1) { }

final JLabel label_4 = new JLabel(); label_4.setText(\电话\);

label_4.setBounds(28, 178, 66, 18);

final JLabel label_3 = new JLabel(); label_3.setText(\班级\);

label_3.setBounds(28, 146, 66, 18); getContentPane().add(label_3);

final JLabel label_2 = new JLabel(); label_2.setText(\班级\);

label_2.setBounds(28, 114, 66, 18); getContentPane().add(label_2);

final JLabel label_1 = new JLabel(); label_1.setText(\姓名\);

label_1.setBounds(28, 79, 66, 18); getContentPane().add(label_1);

final JLabel label = new JLabel(); label.setText(\学号\);

label.setBounds(28, 40, 66, 18); getContentPane().add(label); e1.printStackTrace(); e.printStackTrace(); } catch (SQLException e) {

getContentPane().add(label_4); t1 = new JTextField();

t1.setBounds(100, 38, 106, 22); getContentPane().add(t1); t2 = new JTextField();

t2.setBounds(100, 77, 106, 22); getContentPane().add(t2); t3 = new JTextField();

t3.setBounds(100, 112, 106, 22); getContentPane().add(t3); t4 = new JTextField();

t4.setBounds(100, 144, 106, 22); getContentPane().add(t4); t5 = new JTextField();

t5.setBounds(100, 176, 106, 22); getContentPane().add(t5);

final JButton button = new JButton();

button.addActionListener(new ActionListener() {

public void actionPerformed(final ActionEvent e) {

String sql=\学生信息 set 学号='\+t1.getText()+\

姓名='\+t2.getText()+\班级='\+t3.getText()+\地址='\+t4.getText()+\电话='\+t5.getText()+\学号='\+t1.getText()+\;

if(s==1) { } else {

JOptionPane.showMessageDialog(null, \修改失败\);

JOptionPane.showMessageDialog(null, \修改成功\);

try {

sa=cn.createStatement(); s=sa.executeUpdate(sql);


学生成绩管理系统 - java课程设计报告(3).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:罗岗中学教学常规管理实施方案

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: