基于JAVA的学生成绩管理系统源代码18页

上传人:文库****9 文档编号:173997406 上传时间:2021-03-15 格式:DOC 页数:17 大小:132KB
返回 下载 相关 举报
基于JAVA的学生成绩管理系统源代码18页_第1页
第1页 / 共17页
基于JAVA的学生成绩管理系统源代码18页_第2页
第2页 / 共17页
基于JAVA的学生成绩管理系统源代码18页_第3页
第3页 / 共17页
基于JAVA的学生成绩管理系统源代码18页_第4页
第4页 / 共17页
基于JAVA的学生成绩管理系统源代码18页_第5页
第5页 / 共17页
点击查看更多>>
资源描述

《基于JAVA的学生成绩管理系统源代码18页》由会员分享,可在线阅读,更多相关《基于JAVA的学生成绩管理系统源代码18页(17页珍藏版)》请在金锄头文库上搜索。

1、Java程序设计系 专 业班 级学 号 15号姓 名 刘振基题 目 学生成绩管理系统任课教师 彭杰一:要求1、 用到书上(课本或实验册)上的至少三个实例2、 用到至少两种布局和至少四种组件3、 用到对话框4、 用到对数据库的查询、删除、添加和修改5、 最好用到输入输出流6、 具有一定的实际意义二:内容 本系统用access作为数据库,用到了书上的布局实例和数据库连接实例功能: 1、输入十个同学的学号,姓名,出生日期,二科成绩(学,大学英语) 。2、输入学号查询学生信息。 3、删除记录4、查询记录5、添加记录6、修改记录三:代码第一部分:public class main public stat

2、ic void main(String args) zhuchuangkou win=new zhuchuangkou();第二部分主界面:import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.swing.border.*;public class zhuchuangkou extends Frame implements ActionListenerButton button1,button2,button3,button4,tuichu;Panel p1,p2,p3;Label l1,l2,l

3、3;TextField a1,a2;Box b1,b2,b3,b4,b5;ss s;zhuchuangkou()button1=new Button(登陆);button2=new Button(删除);button3=new Button(修改);button4=new Button(添加);tuichu=new Button(退出);p1=new Panel();p2=new Panel();p3=new Panel();l1=new Label(学生成绩管理,Label.CENTER);l1.setFont(new Font(宋体,Font.BOLD,72);l1.setBackgrou

4、nd(Color.green);l2=new Label(登录名);l3=new Label(密码);a1=new TextField(10);a2=new TextField(10);a2.setEchoChar(*);b1=Box.createVerticalBox();b1.add(l2);b1.add(Box.createVerticalStrut(8);b1.add(l3);b2=Box.createVerticalBox();b2.add(a1);b2.add(Box.createVerticalStrut(8);b2.add(a2);b4=Box.createHorizontal

5、Box();b4.add(button1);b4.add(Box.createHorizontalStrut(10);b4.add(tuichu);b3=Box.createHorizontalBox();b3.add(b1);b3.add(Box.createHorizontalStrut(10);b3.add(b2);b5=Box.createVerticalBox();b5.add(b3);b5.add(Box.createVerticalStrut(8);b5.add(b4);button1.addActionListener(this);button2.addActionListen

6、er(this);button3.addActionListener(this);button4.addActionListener(this);tuichu.addActionListener(this);p1.add(l1);p2.add(b5);add(p1,BorderLayout.NORTH);add(p2,BorderLayout.CENTER);add(p3,BorderLayout.PAGE_END);addWindowListener(new WindowAdapter()public void windowClosing(WindowEvent e)dispose(););

7、setBackground(Color.RED);setBounds(10, 10, 1000, 500);setVisible(true);validate();public void actionPerformed(ActionEvent e)if(e.getSource()=tuichu)System.exit(0);if(e.getSource()=button1)if(a1.getText().equals(liuzhenji)&a2.getText().equals(123456)new chuankou();System.out.println(wwwww);dispose();

8、elseSystem.out.print(nishurucuowu);第三部分选择操作:import java.awt.*;import java.awt.event.*;import javax.swing.*;import javax.swing.border.*;public class zhuchuangkou extends Frame implements ActionListenerButton button1,button2,button3,button4,tuichu;Panel p1,p2,p3;Label l1,l2,l3;TextField a1,a2;Box b1,b

9、2,b3,b4,b5;ss s;zhuchuangkou()button1=new Button(登陆);button2=new Button(删除);button3=new Button(修改);button4=new Button(添加);tuichu=new Button(退出);p1=new Panel();p2=new Panel();p3=new Panel();l1=new Label(学生成绩管理,Label.CENTER);l1.setFont(new Font(宋体,Font.BOLD,72);l1.setBackground(Color.green);l2=new Lab

10、el(登录名);l3=new Label(密码);a1=new TextField(10);a2=new TextField(10);a2.setEchoChar(*);b1=Box.createVerticalBox();b1.add(l2);b1.add(Box.createVerticalStrut(8);b1.add(l3);b2=Box.createVerticalBox();b2.add(a1);b2.add(Box.createVerticalStrut(8);b2.add(a2);b4=Box.createHorizontalBox();b4.add(button1);b4.a

11、dd(Box.createHorizontalStrut(10);b4.add(tuichu);b3=Box.createHorizontalBox();b3.add(b1);b3.add(Box.createHorizontalStrut(10);b3.add(b2);b5=Box.createVerticalBox();b5.add(b3);b5.add(Box.createVerticalStrut(8);b5.add(b4);button1.addActionListener(this);button2.addActionListener(this);button3.addAction

12、Listener(this);button4.addActionListener(this);tuichu.addActionListener(this);p1.add(l1);p2.add(b5);add(p1,BorderLayout.NORTH);add(p2,BorderLayout.CENTER);add(p3,BorderLayout.PAGE_END);addWindowListener(new WindowAdapter()public void windowClosing(WindowEvent e)dispose(););setBackground(Color.RED);s

13、etBounds(10, 10, 1000, 500);setVisible(true);validate();public void actionPerformed(ActionEvent e)if(e.getSource()=tuichu)System.exit(0);if(e.getSource()=button1)if(a1.getText().equals(liuzhenji)&a2.getText().equals(123456)new chuankou();System.out.println(wwwww);dispose();elseSystem.out.print(nishurucuowu);

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号