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

2020-02-21 00:21

}

}

}

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


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

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

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

马上注册会员

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