獎(jiǎng)學(xué)金評(píng)定系統(tǒng)源代碼.doc_第1頁
獎(jiǎng)學(xué)金評(píng)定系統(tǒng)源代碼.doc_第2頁
獎(jiǎng)學(xué)金評(píng)定系統(tǒng)源代碼.doc_第3頁
獎(jiǎng)學(xué)金評(píng)定系統(tǒng)源代碼.doc_第4頁
獎(jiǎng)學(xué)金評(píng)定系統(tǒng)源代碼.doc_第5頁
已閱讀5頁,還剩12頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

import java.awt.*;import java.awt.event.*;import java.sql.*;import javax.swing.event.*;import javax.swing.*;public class mainFrame extends JFrame implements ActionListenerJPanel p;JLabel pic=new JLabel(new ImageIcon(G:獎(jiǎng)學(xué)金評(píng)定系統(tǒng)校門.jpg);JSplitPane top;JSplitPane left;JPanel labelLeft,labelRight;JButton jb1,jb2,jb3,jb4,jchushihua,help,jgeshihua;JComboBox jcom1,jcom2,jcom3,jcom4;JLabel jlab1,jlab2,jlab3,jlab4;JPanel jp1,jp2,jp3,jp4;JTextField jt,jtt;JPanel mark;mainFrame()super(haha);Dimension screen=Toolkit.getDefaultToolkit().getScreenSize();this.setBounds(screen.width-1000)/2,(screen.height-610)/2,1000,610);/窗口居中Container c=this.getContentPane();labelLeft=new JPanel(); / 左邊面板labelRight=new JPanel(); /右邊面板labelLeft.setLayout(new GridLayout(8,3,0,0);jp1=new JPanel(); /信息入庫jlab1=new JLabel(new ImageIcon(G:獎(jiǎng)學(xué)金評(píng)定系統(tǒng)信息入庫.jpg);jcom1=new JComboBox(new String基本信息入庫,分?jǐn)?shù)入庫);jcom1.setFont(new Font(黑體,Font.CENTER_BASELINE,20);jb1=new JButton(確定);jb1.addActionListener(this);jb1.setSize(53,40);jp1.add(jlab1);jp1.add(jcom1);jp1.add(jb1);labelLeft.add(jp1); jp2=new JPanel(); / 查找信息jlab2=new JLabel(new ImageIcon(G:獎(jiǎng)學(xué)金評(píng)定系統(tǒng)信息查找.jpg);jcom2=new JComboBox(new String姓名,學(xué)號(hào));jcom2.setFont(new Font(黑體,Font.CENTER_BASELINE,20);jt=new JTextField(6);jt.setFont(new Font(黑體,Font.CENTER_BASELINE,20);jb2=new JButton(確定);jb2.addActionListener(this);jp2.add(jlab2);jp2.add(jcom2);jp2.add(jt);jp2.add(jb2);labelLeft.add(jp2);jp3=new JPanel();jlab3=new JLabel(new ImageIcon(G:獎(jiǎng)學(xué)金評(píng)定系統(tǒng)統(tǒng)計(jì)結(jié)果.jpg); /統(tǒng)計(jì)結(jié)果jcom3=new JComboBox(new String5,10,15,20,全部);jcom3.setFont(new Font(黑體,Font.CENTER_BASELINE,20);jb3=new JButton(確定);jb3.addActionListener(this);jp3.add(jlab3);jp3.add(jcom3);jp3.add(jb3);labelLeft.add(jp3);jp4=new JPanel(); /刪除信息jlab4=new JLabel(new ImageIcon(G:獎(jiǎng)學(xué)金評(píng)定系統(tǒng)刪除信息.jpg);jcom4=new JComboBox(new String學(xué)號(hào),姓名);jcom4.setFont(new Font(黑體,Font.CENTER_BASELINE,20);jb4=new JButton(確定);jb4.addActionListener(this);jb4.setSize(53,40);jtt=new JTextField(6);jtt.setFont(new Font(黑體,Font.CENTER_BASELINE,18);jp4.add(jlab4);jp4.add(jcom4);jp4.add(jtt);jp4.add(jb4);labelLeft.add(jp4);mark=new JPanel(); jchushihua=new JButton(系統(tǒng)初始化); /系統(tǒng)初始化事件 jchushihua.addActionListener(this);help=new JButton(幫助); /幫助按鈕事件help.addActionListener(this);jgeshihua=new JButton(系統(tǒng)格式化); /系統(tǒng)格式化事件jgeshihua.setSize(40,40);jgeshihua.addActionListener(this);jgeshihua.setFont(new Font(黑體,Font.CENTER_BASELINE,16);help.setSize(40,40);jchushihua.setSize(40,40);help.setFont(new Font(黑體,Font.CENTER_BASELINE,16);jchushihua.setFont(new Font(黑體,Font.CENTER_BASELINE,16);mark.add(help);mark.add(jchushihua);mark.add(jgeshihua);labelLeft.add(mark);labelLeft.add(new JLabel(new ImageIcon(G:獎(jiǎng)學(xué)金評(píng)定系統(tǒng)系統(tǒng).jpg);labelLeft.add(new JLabel(new ImageIcon(G:獎(jiǎng)學(xué)金評(píng)定系統(tǒng)班級(jí).jpg);labelRight.add(new JLabel(new ImageIcon(G:獎(jiǎng)學(xué)金評(píng)定系統(tǒng)厚德.jpg);/右邊面板加入組件 left=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,labelLeft,labelRight);/左右面板加入到主面板 left.setDividerLocation(350);left.setDividerSize(1); top=new JSplitPane(JSplitPane.VERTICAL_SPLIT,pic,left);/主面板在次分為上下面板top.setDividerLocation(69);top.setDividerSize(0);c.add(top); this.setResizable(false); this.setDefaultCloseOperation(3); this.setVisible(true); public void actionPerformed (ActionEvent e)Object c=e.getSource();if(c=jb1) / 添加信息if(jcom1.getSelectedIndex()=0)new basicImformation();elsenew creditImformation(); else if(c=jb2) / 。 查找信息 if(jcom2.getSelectedIndex()=0) String xingming=jt.getText(); String sql1=select * from JSWZ where 姓名=+xingming+; lianjieshujuku j=new lianjieshujuku(); j.chazhaoshuju(sql1); else String xuehao=jt.getText(); String sql1=select * from JSWZ where 學(xué)號(hào)=+xuehao+; lianjieshujuku j=new lianjieshujuku(); j.chazhaoshuju(sql1); else if(c=jb3) /。統(tǒng)計(jì)結(jié)果 int n=jcom3.getSelectedIndex(); if(n=0) String sql=select top(5) * from JSWZ order by 總分 desc; lianjieshujuku j=new lianjieshujuku(); j.chazhaoshuju(sql); else if(n=1) String sql=select top(10) * from JSWZ order by 總分 desc; lianjieshujuku j=new lianjieshujuku(); j.chazhaoshuju(sql); else if(n=2) String sql=select top(15) * from JSWZ order by 總分 desc; lianjieshujuku j=new lianjieshujuku(); j.chazhaoshuju(sql); else if(n=3) String sql=select top(20) * from JSWZ order by 總分 desc; lianjieshujuku j=new lianjieshujuku(); j.chazhaoshuju(sql); else String sql=select * from JSWZ order by 總分 desc; lianjieshujuku j=new lianjieshujuku(); j.chazhaoshuju(sql); else if(c=jb4) / 。 刪除信息 if(jcom4.getSelectedIndex()=0) String xuehao=jtt.getText(); String sql1=delete from 身心素質(zhì) where 學(xué)號(hào)=+xuehao+; String sql2=delete from 專業(yè)素質(zhì) where 學(xué)號(hào)=+xuehao+; String sql3=delete from 思想素質(zhì) where 學(xué)號(hào)=+xuehao+; String sql4=delete from 文化素質(zhì) where 學(xué)號(hào)=+xuehao+; String sql5=delete from 基本信息 where 學(xué)號(hào)=+xuehao+; lianjieshujuku j=new lianjieshujuku(); j. charushuju(sql1); j. charushuju(sql2); j. charushuju(sql3); j. charushuju(sql4); j. charushuju(sql5); jtt.setText(null); else String xingming=jtt.getText(); String sql1=delete from 身心素質(zhì) where 學(xué)號(hào) in (select 學(xué)號(hào) from 基本信息 where 姓名=+xingming+); String sql2=delete from 思想素質(zhì) where 學(xué)號(hào) in (select 學(xué)號(hào) from 基本信息 where 姓名=+xingming+); String sql3=delete from 專業(yè)素質(zhì) where 學(xué)號(hào) in (select 學(xué)號(hào) from 基本信息 where 姓名=+xingming+); String sql4=delete from 文化素質(zhì) where 學(xué)號(hào) in (select 學(xué)號(hào) from 基本信息 where 姓名=+xingming+); String sql5=delete from 基本信息 where 學(xué)號(hào) in (select 學(xué)號(hào) from 基本信息 where 姓名=+xingming+); lianjieshujuku j=new lianjieshujuku(); j. charushuju(sql1); j. charushuju(sql2); j. charushuju(sql3); j. charushuju(sql4); j. charushuju(sql5); jtt.setText(null); else if(c=help) System.out.print(fhg); / 幫助信息 else if(c=jgeshihua) JOptionPane.showMessageDialog(null, 確 定 要 格 式 化 數(shù) 據(jù) 褲 嗎?); String sql1=drop table 身心素質(zhì); String sql2=drop table 專業(yè)素質(zhì); String sql3=drop table 思想素質(zhì); String sql4=drop table 文化素質(zhì); String sql5=drop table 基本信息; String sql6=drop view JSWZ; String sql7=drop view JSW; String sql8=drop view SW; String sql9=drop view JS; lianjieshujuku t=new lianjieshujuku(); t.geshihua(sql9); t.geshihua(sql8); t.geshihua(sql7); t.geshihua(sql6); t.geshihua(sql1); t.geshihua(sql2); t.geshihua(sql3); t.geshihua(sql4); t.geshihua(sql5); else new systemInit(); JOptionPane.showMessageDialog(null, 系 統(tǒng) 初 始 化 成 功!); public static void main(Stringargs)new mainFrame(); class basicImformation extends JFrame implements ActionListener /基本信息入庫JLabel jName,jNum,jSex;JTextField tName,tNum,tSex;JButton oknext; basicImformation() super(填寫基本信息); Dimension screen=Toolkit.getDefaultToolkit().getScreenSize(); this.setBounds(screen.width-300)/2,(screen.height-200)/2,300,200); Container c=this.getContentPane(); c.setLayout(new GridLayout(4,3,0,10); jName=new JLabel(new ImageIcon(G:獎(jiǎng)學(xué)金評(píng)定系統(tǒng)姓名.jpg); jNum=new JLabel(new ImageIcon(G:獎(jiǎng)學(xué)金評(píng)定系統(tǒng)學(xué)號(hào).jpg); jSex=new JLabel(new ImageIcon(G:獎(jiǎng)學(xué)金評(píng)定系統(tǒng)性別.jpg); tName=new JTextField(10);tName.setFont(new Font(,Font.ITALIC,22); tNum=new JTextField(10);tNum.setFont(new Font(,Font.ITALIC,22); tSex=new JTextField(10);tSex.setFont(new Font(,Font.ITALIC,22); oknext=new JButton(提交并下一位); oknext.addActionListener(this); c.add(jName); c.add(tName); c.add(jNum); c.add(tNum); c.add(jSex); c.add(tSex); c.add(new JPanel(); c.add(oknext); this.setResizable(false); this.setVisible(true); /基本信息入庫public void actionPerformed(ActionEvent e)String name=tName.getText();String num=tNum.getText();String sex=tSex.getText();String shuju=insert into 基本信息 values(+num+,+name+,+sex+);new lianjieshujuku().charushuju(shuju);tName.setText(null);tNum.setText(null);tSex.setText(null); class creditImformation extends JFrame implements ActionListener /分?jǐn)?shù)入庫JLabel jSiXiang,jSiXiang1, jSiXiang2,jSiXiang3,jSiXiang4;JLabel jZhuanYe,jZhuanYe1,jZhuanYe2,jZhuanYe3,jZhuanYe4;JLabel jShenXin,jShenXin1,jShenXin2,jShenXin3,jShenXin4;JLabel jWenHua, jWenHua1, jWenHua2, jWenHua3,jWenHua4;JLabel xuehao;JButton queding; String n=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15; JTextField textSiXiang1=new JTextField(5); JComboBox cbSiXiang2=new JComboBox(n); JComboBox cbSiXiang3=new JComboBox(new String0,0.5); JComboBox cbSiXiang4=new JComboBox(new String0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5); JTextField textZhuanYe1=new JTextField(5); JComboBox cbZhuanYe2=new JComboBox(n); JComboBox cbZhuanYe3=new JComboBox(new String0,0.5); JComboBox cbZhuanYe4=new JComboBox(new String0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5); JTextField textShenXin1=new JTextField(5); JComboBox cbShenXin2=new JComboBox(n); JComboBox cbShenXin3=new JComboBox(new String0,0.5); JComboBox cbShenXin4=new JComboBox(new String0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5); JTextField textWenHua1=new JTextField(5); JComboBox cbWenHua2=new JComboBox(n); JComboBox cbWenHua3=new JComboBox(new String0,0.5); JComboBox cbWenHua4=new JComboBox(new String0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5); JTextField texXuehao=new JTextField(15);creditImformation() / 分?jǐn)?shù)入庫super(分?jǐn)?shù)入庫);this.setLocation(350,250 );Container c=this.getContentPane();c.setLayout(new GridLayout(6,1); jSiXiang=new JLabel(思想道德); jSiXiang.setFont(new Font(宋體,Font.BOLD,24); jSiXiang1=new JLabel(基礎(chǔ)分); jSiXiang2=new JLabel(其他/整數(shù)); jSiXiang3=new JLabel(其他/小數(shù)); jSiXiang4=new JLabel(懲罰); Container c1=new Container(); c1.setLayout(new FlowLayout(); c1.add(jSiXiang);c1.add(jSiXiang1);c1.add(textSiXiang1);c1.add(jSiXiang2);c1.add(cbSiXiang2); c1.add(jSiXiang3);c1.add(cbSiXiang3);c1.add(jSiXiang4);c1.add(cbSiXiang4); jZhuanYe=new JLabel(專業(yè)素質(zhì)); jZhuanYe.setFont(new Font(宋體,Font.BOLD,24); jZhuanYe1=new JLabel(基礎(chǔ)分); jZhuanYe2=new JLabel(其他/整數(shù)); jZhuanYe3=new JLabel(其他/小數(shù)); jZhuanYe4=new JLabel(懲罰); Container c2=new Container(); c2.setLayout(new FlowLayout(); c2.add(jZhuanYe);c2.add(jZhuanYe1);c2.add(textZhuanYe1);c2.add(jZhuanYe2);c2.add(cbZhuanYe2); c2.add(jZhuanYe3);c2.add(cbZhuanYe3);c2.add(jZhuanYe4);c2.add(cbZhuanYe4); jShenXin=new JLabel(身心素質(zhì)); jShenXin.setFont(new Font(宋體,Font.BOLD,24); jShenXin1=new JLabel(基礎(chǔ)分); jShenXin2=new JLabel(其他/整數(shù)); jShenXin3=new JLabel(其他/小數(shù)); jShenXin4=new JLabel(懲罰); Container c3=new Container(); c3.setLayout(new FlowLayout(); c3.add(jShenXin);c3.add(jShenXin1);c3.add(textShenXin1);c3.add(jShenXin2);c3.add(cbShenXin2); c3.add(jShenXin3);c3.add(cbShenXin3);c3.add(jShenXin4);c3.add(cbShenXin4); jWenHua=new JLabel(文化素質(zhì)); jWenHua.setFont(new Font(宋體,Font.BOLD,24); jWenHua1=new JLabel(基礎(chǔ)分); jWenHua2=new JLabel(其他/整數(shù)); jWenHua3=new JLabel(其他/小數(shù)); jWenHua4=new JLabel(懲罰); Container c4=new Container(); c4.setLayout(new FlowLayout(); c4.add(jWenHua);c4.add(jWenHua1);c4.add(textWenHua1);c4.add(jWenHua2);c4.add(cbWenHua2); c4.add(jWenHua3);c4.add(cbWenHua3);c4.add(jWenHua4);c4.add(cbWenHua4); xuehao=new JLabel(學(xué)生號(hào)); xuehao.setFont(new Font(宋體,Font.BOLD,24); Container c5=new Container(); c5.setLayout(new FlowLayout(); c5.add(xuehao);c5.add(texXuehao); queding=new JButton(提交); queding.addActionListener(this); c.add(c5);c.add(c1);c.add(c2);c.add(c3);c.add(c4);c.add(queding); pack(); this.setResizable(false); this.setVisible(true);public void actionPerformed(ActionEvent e) String s=textSiXiang1.getText();double ii=Double.parseDouble(s);double n1=0;double n2=0;double n3=0;int x;x=cbSiXiang2.getSelectedIndex();switch(x) case 0: n1=0;break;case 1: n1=1;break;case 2: n1=2;break;case 3: n1=3;break;case 4: n1=4;break;case 5: n1=5;break; case 6: n1=6;break;case 7: n1=7;break;case 8: n1=8;break;case 9: n1=9;break;case 10: n1=10;break;case 11: n1=11;break; case 12: n1=12;break;case 13: n1=13;break;case 14: n1=14;break;case 15: n1=15;break; x=cbSiXiang3.getSelectedIndex(); switch(x) case 0: n2=0;break; case 1: n2=0.5 ;break; x=cbSiXiang4.getSelectedIndex(); switch(x) case 0: n3=0;break;case 1: n3=1;break;case 2: n3=2;break;case 3: n3=3;break;case 4: n3=4;break;case 5: n3=5;break; case 6: n3=6;break;case 7: n3=7;break;case 8: n3=8;break;case 9: n3=9;break;case 10: n3=10;break;case 11: n3=11;break; String m=textZhuanYe1.getText();double mm=Double.parseDouble(m);double m1=0;double m2=0;double m3=0;x=cbZhuanYe2.getSelectedIndex();switch(x) case 0: m1=0;break;case 1: m1=1;break;case 2: m1=2;break;case 3: m1=3;break;case 4: m1=4;break;case 5: m1=5;break; case 6: m1=6;break;case 7: m1=7;break;case 8: m1=8;break;case 9: m1=9;break;case 10: m1=10;break;case 11: m1=11;break; case 12: m1=12;break;case 13: m1=13;break;case 14: m1=14;break;case 15: m1=15;break; x=cbZhuanYe3.getSelectedIndex(); switch(x) case 0: m2=0;break; case 1: m2=0.5 ;break; x=cbZhuanYe4.getSelectedIndex(); switch(x) case 0: m3=0;break;case 1: m3=1;break;case 2: m3=2;break;case 3: m3=3;break;case 4: m3=4;break;case 5: m3=5;break; case 6: m3=6;break;case 7: m3=7;break;case 8: m3=8;break;case 9: m3=9;break;case 10: m3=10;break;case 11: m3=11;break; String o=textShenXin1.getText();double oo=Double.parseDouble(o);double o1=0;double o2=0;double o3=0;x=cbShenXin2.getSelectedIndex();switch(x) case 0: o1=0;break;case 1: o1=1;break;case 2: o1=2;break;case 3: o1=3;break;case 4: o1=4;break;case 5: o1=5;break; case 6: o1=6;break;case 7: o1=7;break;case 8: o1=8;break;case 9: o1=9;break;case 10: o1=10;break;case 11: o1=11;break; case 12: o1=12;break;case 13: o1=13;break;case 14: o1=14;break;case 15: o1=15;break; x=cbShenXin3.getSelectedIndex(); switch(x) case 0: o2=0;break; case 1: o2=0.5 ;break; x=cbShenXin4.getSelectedIndex(); switch(x) case 0: o3=0;break;case 1: o3=1;break;case 2: n3=2;break;case 3: n3=3;break;case 4: n3=4;break;case 5: n3=5;break; case 6: o3=6;break;case 7: o3=7;break;case 8: n3=8;break;case 9: n3=9;break;case 10: n3=10;break;case 11: n3=11;break; String p=textWenHua1.getText();double pp=Double.parseDouble(p);double p1=0;double p2=0;double p3=0;x=cbWenHua2.getSelectedIndex();switch(x) case 0: p1=0;break;case 1: p1=1;break;case 2: p1=2;break;case 3: p1=3;break;case 4: p1=4;break;case 5: p1=5;break; case 6: p1=6;break;case 7: p1=7;break;case 8: p1=8;break;case 9: p1=9;break;case 10: p1=10;break;case 11: p1=11;break; case 12: p1=12;break;case 13: p1=13;break;case 14: p1=14;break;case 15: p1=15;break; x=cbWenHua3.getSelectedIndex(); switch(x) case 0: p2=0;break; case 1: p2=0.5 ;break; x=cbWenHua4.getSelectedIndex(); switch(x) case 0: p3=0;break;case 1: p3=1;break;case 2: p3=2;break;case 3: p3=3;break;case 4: p3=4;break;case 5: p3=5;break; case 6: p3=6;break;case 7: p3=7;break;case 8: p3=8;break;case 9: p3=9;break;case 10: p3=10;break;case 11: p3=11;break; String xuehao=texXuehao.getText(); String sql1=insert into 思想素質(zhì) values(+xuehao+,+ii+,+n1+,+n2+,+n3+); String sql2=insert into 專業(yè)素質(zhì) values(+xuehao+,+mm+,+m1+,+m2+,+m3+); String sql3=insert into 身心素質(zhì) values(+xuehao+,+oo+,+o1+,+o2+,+o3+); String sql4=insert into 文化素質(zhì) values

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論