版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
学生选课系统(数据库课程设计)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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 胖东来员工职业成长通道建设方案
- 别墅建筑设计方案
- 未来五年地板毛料行业市场营销创新战略制定与实施分析研究报告
- 未来五年仪用电源(内置)企业县域市场拓展与下沉战略分析研究报告
- 未来五年养老债券企业数字化转型与智慧升级战略分析研究报告
- 绩效改革方案总结
- 第4课《诗词三首行路难》课件-统编版语文九年级上册
- 基于核心素养与差异化教学的初中物理教学设计-以“温度”为例
- 小学英语五年级上册 Unit 2 My Week 单元复习与素养拓展课教学设计
- 钢结构厂房施工方案
- 50万吨年脱硫石膏及20万吨年废硫磺综合利用项目可行性研究报告写作模板-申批备案
- 《床上擦浴技术》评分标准
- 设备安装可行性方案
- 高中化学人教版(2019)选择性必修二知识点总结
- 消化系统常见症状与体征课件整理-002
- 流程与TOC改善案例
- 【当代中国婚礼空间设计研究4200字(论文)】
- GB/T 20322-2023石油及天然气工业往复压缩机
- 中国重汽车辆识别代号(VIN)编制规则
- 通风与空调监理实施细则abc
- JJF 1614-2017抗生素效价测定仪校准规范
评论
0/150
提交评论