• 大小: 1.44MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-02
  • 语言: Java
  • 标签: jdbc  swing  java实现  

资源简介

此成绩管理系统是基于swing,jdbc编写的一款向程序,其中能够实现学生信息事务管理,课程事务管理,成绩事务管理,适合学习java的新手操作,

资源截图

代码片段和文件信息

package course;

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import dao.CourseManager;;;
public class Cadd extends Dialog implements ActionListener{
private Panel p1p2p3;
private Label lab1lab2lab3lab4;
private TextField t1t2t3t4;
private Button btn1btn2;
public Cadd(frame fString titleboolean mo) {
super(f title mo);
p1= new Panel();
p1.setLayout(new GridLayout(41));
lab1=new Label(“课程号“);
lab2=new Label(“课程名称“);
lab3=new Label(“课程类型“);
lab4=new Label(“课程内容“);

p1.add(lab1);
p1.add(lab2);
p1.add(lab3);
p1.add(lab4);

this.add(p1 BorderLayout.WEST);
p2=new Panel();
p2.setLayout(new GridLayout(4 1));
t1=new TextField();
t2=new TextField();
t3=new TextField();
t4=new TextField();

p2.add(t1);
p2.add(t2);
p2.add(t3);
p2.add(t4);

this.add(p2 BorderLayout.CENTER);
//创建第三个面板,并添加两个按钮
p3=new Panel();
btn1=new Button(“确定“);
btn2=new Button(“取消“);
btn1.addActionListener(this);
btn2.addActionListener(this);
p3.add(btn1);
p3.add(btn2);
this.add(p3BorderLayout.SOUTH);
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension dim= tk.getScreenSize();
this.setBounds(300 400 200 200);
this.setVisible(true);
this.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent w) {
w.getWindow().setVisible(false);
((frame) w.getComponent()).dispose();
System.exit(0);

}
});
}

@Override
public void actionPerformed(ActionEvent e) {
if(e.getSource()==btn1) {
CourseManager sm = new CourseManager();//实例化业务处理类
String sql = “insert into course(cidcnamectypeccontent) values(????)“;
String[] param=new String[] {t1.getText().trim()t2.getText().trim()t3.getText().trim()t4.getText().trim()};
sm.updateStudent(sql param);
this.dispose();
}else if(e.getSource()==btn2) {
this.dispose();
}
}
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-10-25 13:51  grade-management\
     文件        1012  2018-10-19 17:23  grade-management\.classpath
     文件         916  2018-10-25 13:50  grade-management\.project
     目录           0  2018-10-19 17:22  grade-management\.settings\
     文件         567  2018-10-19 17:22  grade-management\.settings\.jsdtscope
     文件         364  2018-10-19 17:22  grade-management\.settings\org.eclipse.jdt.core.prefs
     文件         500  2018-10-25 13:51  grade-management\.settings\org.eclipse.wst.common.component
     文件         345  2018-10-19 17:22  grade-management\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2018-10-19 17:22  grade-management\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2018-10-19 17:22  grade-management\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2018-10-19 17:22  grade-management\build\
     目录           0  2018-10-25 13:51  grade-management\build\classes\
     目录           0  2018-10-25 13:51  grade-management\build\classes\course\
     文件         905  2018-10-25 13:51  grade-management\build\classes\course\Cadd$1.class
     文件        3066  2018-10-25 13:51  grade-management\build\classes\course\Cadd.class
     文件         871  2018-10-25 13:51  grade-management\build\classes\course\CIndex$1.class
     文件        6179  2018-10-25 13:51  grade-management\build\classes\course\CIndex.class
     文件         925  2018-10-25 13:51  grade-management\build\classes\course\Cupd$1.class
     文件        3289  2018-10-25 13:51  grade-management\build\classes\course\Cupd.class
     目录           0  2018-10-25 13:51  grade-management\build\classes\dao\
     文件        2902  2018-10-25 13:51  grade-management\build\classes\dao\baseDao.class
     文件        2286  2018-10-25 13:51  grade-management\build\classes\dao\CourseManager.class
     文件        2889  2018-10-25 13:51  grade-management\build\classes\dao\GradeManager.class
     文件        2360  2018-10-25 13:51  grade-management\build\classes\dao\StudentManager.class
     目录           0  2018-10-25 13:51  grade-management\build\classes\grade\
     文件         900  2018-10-25 13:51  grade-management\build\classes\grade\Gadd$1.class
     文件        3008  2018-10-25 13:51  grade-management\build\classes\grade\Gadd.class
     文件         866  2018-10-25 13:51  grade-management\build\classes\grade\GIndex$1.class
     文件        6893  2018-10-25 13:51  grade-management\build\classes\grade\GIndex.class
     文件         919  2018-10-25 13:51  grade-management\build\classes\grade\Gupd$1.class
     文件        3275  2018-10-25 13:51  grade-management\build\classes\grade\Gupd.class
............此处省略34个文件信息

评论

共有 条评论