




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
学生选课系统(数据库课程设计)JAVA,SQLserver数据库课程设计学生选课系统
importjava.sql.*;
importjavax.swing.*;
importjavax.swing.table.AbstractTableModel;
importjava.awt.*;
importjava.awt.event.*;
publicclassDLAextendsJFrameimplementsActionListener{
JPanelp;
ImageIconi;
Choicec;
JLabell1,l2,l3,l;
JTextFieldt1,t2;
JButtonb1,b2;
publicDLA(Stringstr){
super(str);
p=newJPanel();
i=newImageIcon(“psue.jpg");
l=newJLabel(i);
l.setBounds(0,0,i.getIconWidth(),i.getIconHeight());
getLayeredPane().add(l,newInteger(Integer.MIN_VALUE));
p=(JPanel)this.getContentPane();
p.setOpaque(false);
p.setLayout(newFlowLayout(FlowLayout.CENTER,110,30));
c=newChoice();
c.add("管理员");
c.add("教师");
c.add("学生");
l1=newJLabel("登陆身份");
l2=newJLabel("用户账号");
l3=newJLabel("用户密码");
t1=newJTextField("",10);
t2=newJTextField("",10);
b1=newJButton("确定");
b2=newJButton("退出");
b1.addActionListener(this);
b2.addActionListener(this);
p.add(l1);
p.add(c);
p.add(l2);
p.add(t1);
p.add(l3);
p.add(t2);
p.add(b1);
p.add(b2);
}
publicvoidactionPerformed(ActionEvente){
if(e.getSource()==b1){
if((t1.getText().equals("")||t2.getText().equals(""))||
((!c.getSelectedItem().equals("管理员")||!t1.getText().equals("SQS")||!t2.getText().equals("20XX年28"))
(!c.getSelectedItem().equals("教师")||!t1.getText().equals("JS")||!t2.getText().equals("*****"))
(!c.getSelectedItem().equals("学生")||!t1.getText().equals("XS")||!t2.getText().equals("*****"))))
{t1.setText("");t2.setText("");
JOptionPane.showMessageDialog(this,"账号或密码不能为空或错误!","提示",JOptionPane.*****_*****);}
if(c.getSelectedItem().equals("管理员")t1.getText().equals("SQS")t2.getText().equals("20XX年28")){
this.dispose();
GLYgly=newGLY("管理员界面");
gly.setLocation(400,200);
gly.setSize(500,300);
gly.setVisible(true);
}
if(c.getSelectedItem().equals("教师")t1.getText().equals("JS")t2.getText().equals("*****")){
this.dispose();
JSjs=newJS("教师界面");
js.setLocation(400,200);
js.setSize(500,300);
js.setVisible(true);
}
if(c.getSelectedItem().equals("学生")t1.getText().equals("XS")t2.getText().equals("*****")){
this.dispose();
XSxs=newXS("学生界面");
xs.setLocati
on(400,200);
xs.setSize(500,300);
xs.setVisible(true);
}
}
if(e.getSource()==b2){
System.exit(0);
}
}
publicstaticvoidmain(String[
JAVA,SQLserver数据库课程设计学生选课系统
]args){
DLAdl=newDLA("登陆学生选课系统");
dl.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
dl.setLocation(400,200);
dl.setSize(500,300);
dl.setVisible(true);
}
}
classGLYextendsJFrameimplementsActionListener{
JPanelp;
ImageIconi;
JLabell;
JButtonb1,b2,b3,b4;
publicGLY(Stringstr){
super(str);
p=newJPanel();
i=newImageIcon("http_imgload.jpg");
l=newJLabel(i);
l.setBounds(0,0,i.getIconWidth(),i.getIconHeight());
getLayeredPane().add(l,newInteger(Integer.MIN_VALUE));
p=(JPanel)this.getContentPane();
p.setOpaque(false);
p.setLayout(newFlowLayout(FlowLayout.CENTER,110,70));
b1=newJButton("管理教师");
b2=newJButton("管理学生");
b3=newJButton("管理课程");
b4=newJButton("返回上级");
p.add(b1);
p.add(b2);
p.add(b3);
p.add(b4);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
}
publicvoidactionPerformed(ActionEvente){
if(e.getSource()==b1){
this.dispose();
GLJSgly=newGLJS("管理教师界面");
gly.setLocation(400,200);
gly.setSize(500,300);
gly.setVisible(true);
}
if(e.getSource()==b2){
this.dispose();
GLXSjs=newGLXS("管理学生界面");
js.setLocation(400,200);
js.setSize(500,300);
js.setVisible(true);
}
if(e.getSource()==b3){
this.dispose();
GLKCxs=newGLKC("管理课程界面");
xs.setLocation(400,200);
xs.setSize(500,300);
xs.setVisible(true);
}
if(e.getSource()==b4){
this.dispose();
DLAdl=newDLA("登陆学生选课系统");
dl.setLocation(400,200);
dl.setSize(500,300);
dl.setVisible(true);
}
}
}
classJSextendsJFrameimplementsActionListener{
JPanelp;
JButtonb1,b2,b3;
ImageIconi;
JLabell;
publicJS(Stringstr){
super(str);
p=newJPanel();
i=newImageIcon("*****B19-1.jpg");
l=newJLabel(i);
l.setBounds(0,0,i.getIconWidth(),i.getIconHeight());
getLayeredPane().add(l,newInteger(Integer.MIN_VALUE));
p=(JPanel)this.getContentPane();
p.setOpaque(false);
p.setLayout(newFlowLayout(FlowLayout.CENTER,110,70));
b1=newJButton("个人代课界面");
b2=newJButton("查询自己信息");
b3=newJButton("返回上级");
p.add(b1);
p.add(b2);
p.add(b3);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
}
publicvoidactionPerfo
rmed(ActionEvente){
if(e.getSource()==b1){
this.dispose();
JSDKgly=newJSDK("个人代课界面界面");
gly.setLocation(400,200);
gly.setSize
JAVA,SQLserver数据库课程设计学生选课系统
(500,300);
gly.setVisible(true);
}
if(e.getSource()==b2){
this.dispose();
DLJSXXjs=newDLJSXX("查询自己信息界面");
js.setLocation(400,200);
js.setSize(500,300);
js.setVisible(true);
}
if(e.getSource()==b3){
this.dispose();
DLAdl=newDLA("登陆学生选课系统");
dl.setLocation(400,200);
dl.setSize(500,300);
dl.setVisible(true);
}
}
}
classXSextendsJFrameimplementsActionListener{
JPanelp;
ImageIconi;
JLabell;
JButtonb1,b2,b3;
publicXS(Stringstr){
super(str);
p=newJPanel();
i=newImageIcon("psbe.jpg");
l=newJLabel(i);
l.setBounds(0,0,i.getIconWidth(),i.getIconHeight());
getLayeredPane().add(l,newInteger(Integer.MIN_VALUE));
p=(JPanel)this.getContentPane();
p.setOpaque(false);
p.setLayout(newFlowLayout(FlowLayout.CENTER,110,70));
b1=newJButton("个人选课界面");
b2=newJButton("查询自己信息");
b3=newJButton("返回上级");
p.add(b1);
p.add(b2);
p.add(b3);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
}
publicvoidactionPerformed(ActionEvente){
if(e.getSource()==b1){
this.dispose();
XSXKgly=newXSXK("个人选课界面");
gly.setLocation(400,200);
gly.setSize(500,300);
gly.setVisible(true);
}
if(e.getSource()==b2){
this.dispose();
DLXSXXjs=newDLXSXX("查询自己信息");
js.setLocation(400,200);
js.setSize(500,300);
js.setVisible(true);
}
if(e.getSource()==b3){
this.dispose();
DLAdl=newDLA("登陆学生选课系统");
dl.setLocation(400,200);
dl.setSize(500,300);
dl.setVisible(true);
}
}
}
classGLJSextendsJFrameimplementsActionListener{
JPanelp;
ImageIconi;
JLabell;
JButtonb1,b2,b3,b4;
publicGLJS(Stringstr){
super(str);
JPanelp=newJPanel();
i=newImageIcon("qingchun09.jpg");
l=newJLabel(i);
l.setBounds(0,0,i.getIconWidth(),i.getIconHeight());
getLayeredPane().add(l,newInteger(Integer.MIN_VALUE));
p=(JPanel)this.getContentPane();
p.setOpaque(false);
p.setLayout(newFlowLayout(FlowLayout.CENTER,110,70));
b1=newJButton("添加教师");
b2=newJButton("删除教师");
b3=newJButton("查询教师");
b4=newJButton("返回上级");
p.add(b1);
p.add(b2);
p.add(b3);
p.add(b4);
b1.addActionListener(this);
b2.addActionListener(this);
b3.a
ddActionListener(this);
b4.addActionListener(this);
}
publicvoidactionPerformed(ActionEvente){
if(e.getSource()==b1){
this.dispose();
T
JAVA,SQLserver数据库课程设计学生选课系统
JJSgly=newTJJS("添加教师界面");
gly.setLocation(400,200);
gly.setSize(500,300);
gly.setVisible(true);
}
if(e.getSource()==b2){
this.dispose();
SCJSjs=newSCJS("删除教师界面");
js.setLocation(400,200);
js.setSize(500,300);
js.setVisible(true);
}
if(e.getSource()==b3){
this.dispose();
CXJSxs=newCXJS("查询教师界面");
xs.setLocation(400,200);
xs.setSize(500,300);
xs.setVisible(true);
}
if(e.getSource()==b4){
this.dispose();
GLYgly=newGLY("管理员界面");
gly.setLocation(400,200);
gly.setSize(500,300);
gly.setVisible(true);
}
}
}
classGLXSextendsJFrameimplementsActionListener{
JPanelp;
ImageIconi;
JLabell;
JButtonb1,b2,b3,b4;
publicGLXS(Stringstr){
super(str);
p=newJPanel();
i=newImageIcon("截图***-*****83.jpg");
l=newJLabel(i);
l.setBounds(0,0,i.getIconWidth(),i.getIconHeight());
getLayeredPane().add(l,newInteger(Integer.MIN_VALUE));
p=(JPanel)this.getContentPane();
p.setOpaque(false);
p.setLayout(newFlowLayout(FlowLayout.CENTER,110,70));
b1=newJButton("添加学生");
b2=newJButton("删除学生");
b3=newJButton("查询学生");
b4=newJButton("返回上级");
p.add(b1);
p.add(b2);
p.add(b3);
p.add(b4);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
}
publicvoidactionPerformed(ActionEvente){
if(e.getSource()==b1){
this.dispose();
TJXSgly=newTJXS("添加学生界面");
gly.setLocation(400,200);
gly.setSize(500,300);
gly.setVisible(true);
}
if(e.getSource()==b2){
this.dispose();
SCXSjs=newSCXS("删除学生界面");
js.setLocation(400,200);
js.setSize(500,300);
js.setVisible(true);
}
if(e.getSource()==b3){
this.dispose();
CXXSxs=newCXXS("查询学生界面");
xs.setLocation(400,200);
xs.setSize(500,300);
xs.setVisible(true);
}
if(e.getSource()==b4){
this.dispose();
GLYgly=newGLY("管理员界面");
gly.setLocation(400,200);
gly.setSize(500,300);
gly.setVisible(true);
}
}
}
classGLKCextendsJFrameimplementsActionListener{
JPanelp;
ImageIconi;
JLabell;
JButtonb1,b2,b3,b4;
publicGLKC(Stringstr){
super(str);
p=newJPanel();
i=newImageIcon("70b90e
f82ea9c0dc58ee905c.jpg");
l=newJLabel(i);
l.setBounds(0,0,i.getIconWidth(),i.getIconHeight());
getLayeredPane().add(l,newInteger(
JAVA,SQLserver数据库课程设计学生选课系统
Integer.MIN_VALUE));
p=(JPanel)this.getContentPane();
p.setOpaque(false);
p.setLayout(newFlowLayout(FlowLayout.CENTER,110,70));
b1=newJButton("添加课程");
b2=newJButton("删除课程");
b3=newJButton("查询课程");
b4=newJButton("返回上级");
p.add(b1);
p.add(b2);
p.add(b3);
p.add(b4);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
}
publicvoidactionPerformed(ActionEvente){
if(e.getSource()==b1){
this.dispose();
TJKCgly=newTJKC("添加课程界面");
gly.setLocation(400,200);
gly.setSize(500,300);
gly.setVisible(true);
}
if(e.getSource()==b2){
this.dispose();
SCKCjs=newSCKC("删除课程界面");
js.setLocation(400,200);
js.setSize(500,300);
js.setVisible(true);
}
if(e.getSource()==b3){
this.dispose();
CXKCxs=newCXKC("查询课程界面");
xs.setLocation(400,200);
xs.setSize(500,300);
xs.setVisible(true);
}
if(e.getSource()==b4){
this.dispose();
GLYgly=newGLY("管理员界面");
gly.setLocation(400,200);
gly.setSize(500,300);
gly.setVisible(true);
}
}
}
classTJJSextendsJFrameimplementsActionListener{
JPanelp;
ImageIconi;
JLabell1,l2,l3,l4,l5,l
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 绵阳绿卡服务管理办法
- 宜昌物业收费管理办法
- 托管机构配送管理办法
- 育儿健康教育课件
- 肥乡实验中学消防课件
- 套管培训大纲课件
- 肠癌化疗护理
- 网球培训教程课件图片
- 对口高考最难数学试卷
- 高中1到9章的数学试卷
- 大厦工程施工设计方案
- 2025-2030中国电力设备检测行业市场深度调研及发展前景与投融资战略规划研究报告
- 2025至2030年中国不锈钢蚀刻板数据监测研究报告
- DB42T743-2016 高性能蒸压砂加气混凝土砌块墙体自保温系统应用技术规程
- 软件研发行业安全生产培训
- 《供应链管理法律风险》课件
- 儿童专注力训练300题可打印
- 2025年度工业园区物业管理及服务收费标准及细则
- 三升四数学暑假思维训练题答案
- 2024-2030年中国桥梁管理与养护市场调查研究及发展趋势分析报告
- 山东省菏泽市2023-2024学年高一下学期7月期末考试 政治 含解析
评论
0/150
提交评论