学生选课系统(数据库课程设计)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

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[9].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(200628))&&(!c.getSelectedItem().equals(½Ìʦ)||!t1.getText().equals(JS)||!t2.getText().equals(123456))&&(!c.getSelectedItem().equals(ѧÉú)||!t1.getText().equals(XS)||!t2.getText().equals(123456)))){t1.setText();t2.setText();JOptionPane.showMessageDialog(this,Õ˺ŻòÃÜÂë²»ÄÜΪ¿Õ»ò´íÎó!,Ìáʾ,JOptionPane.WARNING_MESSAGE);}if(c.getSelectedItem().equals(¹ÜÀíÔ±)&&t1.getText().equals(SQS)&&t2.getText().equals(200628)){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(123456)){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(123456)){this.dispose();XSxs=newXS(ѧÉú½çÃæ);xs.setLocation(400,200);xs.setSize(500,300);xs.setVisible(true);}}if(e.getSource()==b2){System.exit(0);}}publicstaticvoidmain(String[]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[5].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(111115B19-1[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);}publicvoidactionPerformed(ActionEvente){if(e.getSource()==b1){this.dispose();JSDKgly=newJSDK(¸öÈË´ú¿Î½çÃæ½çÃæ);gly.setLocation(400,200);gly.setSize(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[10].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.addActio

1 / 38
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功