版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
學(xué)號(hào)20152015-2016學(xué)年第2學(xué)期《Java課程設(shè)計(jì)》課程設(shè)計(jì)報(bào)告題目:學(xué)生信息管理系統(tǒng)專業(yè):計(jì)算機(jī)科學(xué)及技術(shù)班級(jí):13計(jì)科2班姓名:張琪指導(dǎo)教師:時(shí)慧琨成績(jī):計(jì)算機(jī)學(xué)院2016年4月12日目錄一設(shè)計(jì)內(nèi)容及要求 11.1意義 11.2目標(biāo) 1二概要設(shè)計(jì) 12.1功能模塊設(shè)計(jì) 12.2函數(shù)的設(shè)計(jì)及描述 2(1)數(shù)據(jù)庫(kù)設(shè)計(jì) 2(2)模塊接口設(shè)計(jì) 22.3程序流程圖 3三設(shè)計(jì)過(guò)程或程序代碼 43.1設(shè)計(jì)過(guò)程 43.2程序代碼以及數(shù)據(jù)庫(kù)截圖 4四設(shè)計(jì)結(jié)果及分析 64.1登錄界面 64.2主界面 74.3查詢學(xué)生個(gè)人信息界面 9五總結(jié)及參考文獻(xiàn) 105.1總結(jié) 105.1參考文獻(xiàn) 10部分源代碼 11一設(shè)計(jì)內(nèi)容及要求1.1意義 現(xiàn)代科學(xué)多元化已經(jīng)開始了。隨著科學(xué)技術(shù)的快速發(fā)展和人們生活水平的提高,信息技術(shù)越來(lái)越深入人心。計(jì)算機(jī)在人類生活和學(xué)習(xí)中充當(dāng)著很重要的作用。隨著信息技術(shù)在管理上越來(lái)越深入而廣泛的應(yīng)用,管理信息系統(tǒng)的實(shí)施在技術(shù)上已逐步成熟。管理信息系統(tǒng)是一個(gè)不斷發(fā)展的新型學(xué)科,任何一個(gè)單位要生存要發(fā)展,要高效率地把內(nèi)部活動(dòng)有機(jī)地組織起來(lái),就必須建立及自身特點(diǎn)相適應(yīng)的管理信息系統(tǒng)。而建立一個(gè)方便快捷的管理系統(tǒng)是每個(gè)管理者所希望的。我設(shè)計(jì)的是一個(gè)關(guān)于學(xué)生信息管理的數(shù)據(jù)庫(kù)系統(tǒng),通過(guò)這個(gè)系統(tǒng)管理員可以簡(jiǎn)捷、方便的對(duì)學(xué)生信息進(jìn)行增加、瀏覽、刪除等功能,而用戶也可以通過(guò)這個(gè)系統(tǒng)對(duì)學(xué)生信息進(jìn)行查詢等功能,從而使學(xué)校和個(gè)人更方便的查找,瀏覽學(xué)生的信息,并通過(guò)成績(jī)排序?qū)W(xué)生的情況作進(jìn)一步的了解,對(duì)學(xué)生的管理更加便捷。1.2目標(biāo)通過(guò)該題目的設(shè)計(jì)過(guò)程,可以培養(yǎng)學(xué)生結(jié)構(gòu)化程序設(shè)計(jì)的思想,加深對(duì)高級(jí)語(yǔ)言基本語(yǔ)言要素和控制結(jié)構(gòu)的理解,針對(duì)c語(yǔ)言中的重點(diǎn)和難點(diǎn)內(nèi)容進(jìn)行訓(xùn)練,獨(dú)立完成有一定工作量的程序設(shè)計(jì)任務(wù),同時(shí)強(qiáng)調(diào)好的程序設(shè)計(jì)風(fēng)格。得到軟件工程的綜合訓(xùn)練,提高解決實(shí)際問(wèn)題的能力。二概要設(shè)計(jì)2.1功能模塊設(shè)計(jì)學(xué)生管理系統(tǒng):1、錄入學(xué)生信息2、刪除學(xué)生信息3、瀏覽學(xué)生信息4、查找學(xué)生信息1)按學(xué)號(hào)查找2)按姓名查找3)按成績(jī)查找
5、根據(jù)總成績(jī)排序
6、保存學(xué)生信息7、將文件導(dǎo)出
8、退出信息系統(tǒng)2.2函數(shù)的設(shè)計(jì)及描述(1)數(shù)據(jù)庫(kù)設(shè)計(jì)本程序中,對(duì)于學(xué)生信息的記錄用了表的形式,對(duì)于主要數(shù)據(jù)的應(yīng)用如下:數(shù)據(jù)中分別包涵字段:學(xué)號(hào)、姓名、性別、民族、學(xué)院、專業(yè)、班級(jí)、聯(lián)系方式、QQ號(hào)碼、父母的姓名、家庭住址、獎(jiǎng)懲信息以及照片等。數(shù)據(jù)庫(kù)通過(guò)MySQL搭建,數(shù)據(jù)庫(kù)名為student_register_manager;其中包含兩個(gè)表,一個(gè)是賬戶注冊(cè)表格,一個(gè)是學(xué)生的信息表格,通過(guò)JDBC將數(shù)據(jù)庫(kù)及學(xué)生信息管理系統(tǒng)鏈接起來(lái),方便隨時(shí)可以修改數(shù)據(jù)以及查詢數(shù)據(jù)。(2)模塊接口設(shè)計(jì)本程序執(zhí)行的入口是Login界面,從登陸界面登錄,進(jìn)入我們的主界面Main.java;在該界面中,我添加了數(shù)個(gè)菜單項(xiàng),通過(guò)項(xiàng)目菜單可以方便快捷的打開我們的各個(gè)分功能;其中涉及到的有:MennItem_jiemian(package)banjiInfor.java班級(jí)信息查詢banjiInformationXiugai.java對(duì)班級(jí)信息進(jìn)行修改personInformation.java個(gè)人信息查詢personInformationXiugai.java個(gè)人信息修改pwXiugai.java管理員密碼修改xinZeng.java 添加學(xué)生信息kaifaInfor 開發(fā)者信息db(package)connectDb.java數(shù)據(jù)庫(kù)鏈接2.3程序流程圖登錄界面登錄界面主界面主界面班級(jí)信息修改個(gè)人信息查詢個(gè)人信息修改管理員密碼修改添加學(xué)生信息開發(fā)者信息班級(jí)信息查詢班級(jí)信息修改個(gè)人信息查詢個(gè)人信息修改管理員密碼修改添加學(xué)生信息開發(fā)者信息班級(jí)信息查詢圖(2.3.1)程序流程圖三設(shè)計(jì)過(guò)程或程序代碼3.1設(shè)計(jì)過(guò)程在本次程序設(shè)計(jì)中,我按照所學(xué),首先設(shè)計(jì)了程序功能分析,一個(gè)學(xué)生信息管理系統(tǒng)應(yīng)該具備對(duì)學(xué)生信息增刪改查功能;我根據(jù)功能,設(shè)計(jì)了程序流程圖以及數(shù)據(jù)庫(kù)的數(shù)據(jù)表。3.2程序代碼以及數(shù)據(jù)庫(kù)截圖數(shù)據(jù)庫(kù)連接代碼如下:importjava.sql.Connection;importjava.sql.DriverManager;importjava.sql.ResultSet;importjava.sql.SQLException;importjava.sql.Statement;publicclassconnectDb{ privateConnectioncon; privateStatementstat;publicconnectDb(){ try{Class.forName("com.mysql.jdbc.Driver");//MYSQL驅(qū)動(dòng)con=DriverManager .getConnection( "jdbc:mysql://127.0.0.1:3306/student_register_manager", "root","54zhangqi");//鏈接本地MYSQL stat=con.createStatement();//聲明}catch(Exceptione){System.out.print("MYSQLERROR:"+e.getMessage()); try{ stat=con.createStatement(); }catch(SQLExceptione){ e.printStackTrace(); publicjava.sql.ResultSetquery(Stringsql)throwsSQLException{ returnstat.executeQuery(sql); *執(zhí)行 *@paramsql *@return *@throwsSQLException publicBooleanexecute(Stringsql)throwsSQLException{ returnstat.execute(sql);數(shù)據(jù)庫(kù)截圖如下:圖(3.2.1)數(shù)據(jù)庫(kù)截圖圖(3.2.2)表結(jié)構(gòu)截圖圖(3.2.3)表數(shù)據(jù)截圖四設(shè)計(jì)結(jié)果及分析4.1登錄界面圖(4.1.1)登陸界面在登錄界面上輸入用戶名和密碼登錄,如果錯(cuò)誤會(huì)有信息提示,退出按鈕用于推出,該界面不可隨意改變大小。本著友好界面精神和人性化設(shè)計(jì),我引入了綠色養(yǎng)眼的背景。登錄錯(cuò)誤提示錯(cuò)誤界面:圖(3.1.2)登陸密碼錯(cuò)誤界面4.2主界面界面如下:圖(4.2.1)主界面圖(4.2.2)主界面圖(4.2.3)主界面在我的主界面上,我添加看我校之校訓(xùn),明德,至善;博學(xué),篤行;上圖中分別顯示了我的學(xué)生信息管理系統(tǒng)所包含的功能,通過(guò)單擊菜單選項(xiàng),我們可以進(jìn)入各個(gè)子功能界面,完成學(xué)生信息管理工作。4.3查詢學(xué)生個(gè)人信息界面圖()查詢學(xué)生個(gè)人信息界面輸入學(xué)號(hào),單擊查詢,查找成功后,程序?qū)?shù)據(jù)庫(kù)中的信息導(dǎo)出如下圖:圖()查詢學(xué)生個(gè)人信息查找成功界面五總結(jié)及參考文獻(xiàn)5.1總結(jié)在這個(gè)《學(xué)生信息管理系統(tǒng)》Java語(yǔ)言課程設(shè)計(jì)中,完成了基本功能,即可以完成各種查詢、修改以及錄入功能。在開始進(jìn)行課程設(shè)計(jì)時(shí),先進(jìn)行界面模塊的總體把握,充分了解自己要設(shè)計(jì)的程序的總體的結(jié)構(gòu),從而,在其過(guò)程中能一個(gè)模塊一個(gè)界面的進(jìn)行詳細(xì)的構(gòu)思,從而在調(diào)試程序時(shí)也顯得比較輕松。雖然出現(xiàn)了很多的錯(cuò)誤,但是通過(guò)自己和同學(xué)的共同努力,終于找到錯(cuò)誤并加以改正。為了完成這次設(shè)計(jì),參考了一些書籍,細(xì)看了課本,了解了以前常忽視卻很重要的東西,深化了對(duì)Java語(yǔ)言的理解,進(jìn)一步理解對(duì)Java語(yǔ)言進(jìn)行程序設(shè)計(jì)的方法和步驟,加深了結(jié)構(gòu)化程序設(shè)計(jì)的思想,更重要的是,積累了很多調(diào)試程序的經(jīng)驗(yàn),為進(jìn)一步學(xué)習(xí)Java語(yǔ)言奠定了一定的基礎(chǔ),同時(shí)也為今后的學(xué)習(xí)和生活奠定了基礎(chǔ),有利于今后的發(fā)展。5.1參考文獻(xiàn)[1]耿祥義、張躍平著述.Java程序設(shè)計(jì)實(shí)用教程[M].1版.北京:人民郵電出版社,2010[2]張帆等編著.Java實(shí)例開發(fā)大全[M].北京:清華大學(xué)出版社,2010.6[3](美)埃克爾著陳昊鵬譯.Java編程思想.機(jī)械工業(yè)出版社.2004年3月[4]昊斯特曼(HorstmannCayS.)GaryCornell.JAVA核心技術(shù).電子工業(yè)出版社出版,2011年7月1日[5]李剛編著.瘋狂Java講義.電子工業(yè)出版社;2008.9部分源代碼packagejiemian;importjava.awt.Color;importjava.awt.Container;importjava.awt.Dimension;importjava.awt.Font;importjava.awt.GridLayout;importjava.awt.Image;importjava.awt.Toolkit;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.sql.Connection;importjava.sql.DriverManager;importjava.sql.ResultSet;importjava.sql.SQLException;importjava.sql.Statement;importjavax.swing.ImageIcon;importjavax.swing.JButton;importjavax.swing.JFrame;importjavax.swing.JLabel;importjavax.swing.JOptionPane;importjavax.swing.JPanel;importjavax.swing.JPasswordField;importjavax.swing.JTextField;importjavax.swing.WindowConstants;importdb.connectDb;publicclassLoginextendsJFrameimplementsActionListener{ privateJLabelhan_biaoti_label; privateJLabelenglish_biaoti_label; privateJLabeluser_label; privateJTextFielduser_field; privateJLabeluser_password_label; privateJPasswordFielduser_password; privateJButtonlogin_button; privateJButtonexit_button; publicLogin(){ Fontmax=newFont("楷體",Font.BOLD,40);//定義字體大小 Fontmin=newFont("TimesRoman",Font.ITALIC,20); JPaneljpanel=newJPanel();//面板 this.setContentPane(jpanel);//為窗體添加一個(gè)面板】 GridLayoutgird=newGridLayout(3,0);//建立一個(gè)表格的版面對(duì)象。rows代表有幾行,cols代表有幾列 jpanel.setLayout(gird);//將表格面板添加到面板 ImageIconiconBackground=newImageIcon("src/background.jpg");//導(dǎo)入背景圖片 JLabelimgLabel=newJLabel(iconBackground);//將背景添加到一個(gè)Label標(biāo)簽中 intwidth=500;//面板寬 intheight=350;//面板高 iconBackground.setImage(iconBackground.getImage().getScaledInstance( width,height,Image.SCALE_DEFAULT));//設(shè)置背景圖片大小,且按比例縮小填充 this.getContentPane().add(imgLabel,newInteger(Integer.MIN_VALUE));//設(shè)置imaLabel是面板的最底層 imgLabel.setSize(500,350); this.getLayeredPane().setLayout(null); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);//設(shè)置退出按鈕有效 jpanel.setOpaque(false);//設(shè)置面板不透明 countComponents();//構(gòu)造一個(gè)新的Container容器。 this.getLayeredPane().add(imgLabel,newInteger(Integer.MIN_VALUE)); imgLabel.setSize(500,350); this.getLayeredPane().setLayout(null); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); this.setTitle("學(xué)生信息管理系統(tǒng)"); Dimensiondimension=Toolkit.getDefaultToolkit().getScreenSize();//返回當(dāng)前分辨率 this.setBounds(((int)dimension.getWidth()-500)/2, ((int)dimension.getHeight()-380)/2,width,height);//設(shè)置窗體在屏幕上的位置,通過(guò)dimension獲取屏幕, this.setResizable(false);//設(shè)置窗體不可以調(diào)整大小 this.setLayout(null);//默認(rèn)布局 this.setDefaultCloseOperation(this.EXIT_ON_CLOSE); han_biaoti_label=newJLabel("學(xué)生信息管理系統(tǒng)"); han_biaoti_label.setBounds(50,40,400,40); han_biaoti_label.setFont(max); this.add(han_biaoti_label); english_biaoti_label=newJLabel("StudentinformationManagerSystem"); english_biaoti_label.setBounds(110,80,400,40); english_biaoti_label.setFont(min); this.add(english_biaoti_label); user_label=newJLabel("用戶名:"); user_label.setBounds(100,150,70,30); user_label.setFont(min); this.add(user_label); user_field=newJTextField(); user_field.setBounds(190,150,180,30); this.add(user_field); user_password_label=newJLabel("密碼:"); user_password_label.setBounds(100,200,70,30); user_password_label.setFont(min); this.add(user_password_label); user_password=newJPasswordField(); user_password.setBounds(190,200,180,30); this.add(user_password); login_button=newJButton("登錄"); login_button.setBounds(120,260,100,35); login_button.setFont(min); //System.out.println("ssss"); login_button.addActionListener(newActionListener(){ publicvoidactionPerformed(ActionEvente){ //System.out.println("ssss"); Stringuser_name=user_field.getText(); Stringuser_pw=user_password.getText(); try{ //System.out.println("ssss"); Connectioncon=null;//定義一個(gè)MYSQL鏈接對(duì)象 Class.forName("com.mysql.jdbc.Driver").newInstance(); con=DriverManager .getConnection( "jdbc:mysql://127.0.0.1:3306/student_register_manager", "root","54zhangqi");//鏈接本地MYSQL Statementstat=con.createStatement();//聲明 ResultSetres=stat.executeQuery("select*fromuser_register");//執(zhí)行查詢 if(res.next()){ if(res.getString("user_name").equals(user_name)&&res.getString("user_password").equals(user_pw)){ dispose(); newMain(); }else{ JOptionPane.showMessageDialog(null,"登錄失?。?,"提示", JOptionPane.ERROR_MESSAGE); }catch(Exceptione2){ System.out.println("yc"+e2.getMessage()); this.add(login_button); exit_button=newJButton("退出"); exit_button.setBounds(260,260,100,35); exit_button.setFont(min); exit_button.addActionListener(newActionListener(){ publicvoidactionPerformed(ActionEvente){ System.exit(0); this.add(exit_button); this.setVisible(true); publicstaticvoidmain(String[]args){ newLogin(); publicvoidactionPerformed(ActionEvente){ //TODOAuto-generatedmethodstubpackagejiemian;importjava.awt.Color;importjava.awt.Font;importjava.awt.GridLayout;importjava.awt.Image;importjava.awt.MenuBar;importjava.awt.Window;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.awt.event.WindowAdapter;importjava.awt.event.WindowEvent;importjavax.swing.ImageIcon;importjavax.swing.JFrame;importjavax.swing.JLabel;importjavax.swing.JMenu;importjavax.swing.JMenuBar;importjavax.swing.JMenuItem;importjavax.swing.JPanel;importjavax.swing.JPasswordField;importjavax.swing.WindowConstants;importmenuItem_jiemian.banjiInfor;importmenuItem_jiemian.banjiInforXiugai;importmenuItem_jiemian.kaifaInfor;importmenuItem_jiemian.personInforXiugai;importmenuItem_jiemian.personInformation;importmenuItem_jiemian.pwMimaxiugai;importmenuItem_jiemian.xinZeng;publicclassMainextendsJFrameimplementsActionListener{ privateJLabeljLabel1; privateJLabeljLabel2; privateJLabeljLabel3; privateJMenuhelp_menu; privateJMenuinformation_weihu; privateJMenuinfor_check; privateJMenuguanyu; publicMain(){ //創(chuàng)建窗體事件 addWindowListener(newWindowAdapter(){ publicvoidwindowClosing(finalWindowEvente){ Main.this.dispose(); Fontmax=newFont("楷體",Font.BOLD,48); Fontmin=newFont("楷體",Font.ITALIC,32); JPaneljPanel=newJPanel(); this.setContentPane(jPanel); GridLayoutgridLayout=newGridLayout(3,0); jPanel.setLayout(gridLayout); ImageIconima_main_background=newImageIcon("src/main_background.jpg"); JLabelima_background_label=newJLabel(ima_main_background); intheight=500; intwidth=700; ima_main_background.setImage(ima_main_background.getImage() .getScaledInstance(width,height,Image.SCALE_DEFAULT)); ima_background_label.setSize(width,height); this.getLayeredPane().add(ima_background_label, newInteger(Integer.MIN_VALUE)); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); jPanel.setOpaque(false);//設(shè)置面板不透明 this.setResizable(false); countComponents();//構(gòu)造一個(gè)新的Container容器。 setTitle("學(xué)生信息管理系統(tǒng)"); setBounds(350,150,700,500);//設(shè)置位置 this.setLayout(null); jLabel1=newJLabel("明德至善"); jLabel1.setFont(max); jLabel1.setBounds(120,100,400,50); this.add(jLabel1); jLabel2=newJLabel("博學(xué)篤行"); jLabel2.setFont(max); jLabel2.setBounds(220,190,400,50); this.add(jLabel2); jLabel3=newJLabel("——淮南師范學(xué)院"); jLabel3.setFont(min); jLabel3.setBounds(380,280,400,50); jLabel3.setForeground(Color.BLUE); this.add(jLabel3); JMenuBarbar=newJMenuBar(); information_weihu=newJMenu("信息維護(hù)"); JMenuItemperson_check_infor=newJMenuItem("個(gè)人信息查詢"); person_check_infor.addActionListener(newActionListener(){ publicvoidactionPerformed(ActionEvente){ newpersonInformation(); JMenuItempw_xiugai=newJMenuItem("密碼修改"); pw_xiugai.addActionListener(newActionListener(){ publicvoidactionPerformed(ActionEvente){ newpwMimaxiugai(); information_weihu.add(person_check_infor); information_weihu.add(pw_xiugai); infor_check=newJMenu("信息查詢"); JMenuItembanji_infor_check=newJMenuItem("班級(jí)信息查詢"); banji_infor_check.addActionListener(newActionListener(){ publicvoidactionPerformed(ActionEvente){ newbanjiInfor(); JMenuItembanji_infor_tianjia=newJMenuItem("同學(xué)信息添加"); banji_infor_tianjia.addActionListener(newActionListener(){ publicvoidactionPerformed(ActionEvente){ newxinZeng(); JMenuItembanji_infor_xiugai=newJMenuItem("班級(jí)信息修改"); banji_infor_xiugai.addActionListener(newActionListener(){ publicvoidactionPerformed(ActionEvente){ newbanjiInforXiugai(); JMenuItemperson_infor_xiugai=newJMenuItem("個(gè)人信息修改"); person_infor_xiugai.addActionListener(newActionListener(){ publicvoidactionPerformed(ActionEvente){ newpersonInforXiugai(); infor_check.add(banji_infor_check); infor_check.add(banji_infor_tianjia); infor_check.add(banji_infor_xiugai); infor_check.add(person_infor_xiugai); help_menu=newJMenu("幫助"); JMenuItemhelp_item=newJMenuItem("幫助"); help_item.addActionListener(newActionListener(){ publicvoidactionPerformed(ActionEvente){ help_menu.add(help_item); guanyu=newJMenu("關(guān)于"); JMenuItemguanyu_kaifa=newJMenuItem("開發(fā)人員"); guanyu_kaifa.addActionListener(newActionListener(){ publicvoidactionPerformed(ActionEvente){ newkaifaInfor(); guanyu.add(guanyu_kaifa); bar.add(infor_check); bar.add(information_weihu); bar.add(help_menu); bar.add(guanyu); setJMenuBar(bar);//在窗口中添加菜單欄 this.setVisible(true); publicstaticvoidmain(String[]args){ newMain(); @Override publicvoidactionPerformed(ActionEvente){ //TODOAuto-generatedmethodstubpackagedb;importjava.sql.Connection;importjava.sql.DriverManager;importjava.sql.ResultSet;importjava.sql.SQLException;importjava.sql.Statement;publicclassconnectDb{ privateConnectioncon; privateStatementstat;publicconnectDb(){ try{Class.forName("com.mysql.jdbc.Driver");//MYSQL驅(qū)動(dòng)con=DriverManager .getConnection( "jdbc:mysql://127.0.0.1:3306/student_register_manager", "root","54zhangqi");//鏈接本地MYSQL stat=con.createStatement();//聲明}catch(Exceptione){System.out.print("MYSQLERROR:"+e.getMessage()); try{ stat=con.createStatement(); }catch(SQLExceptione){ e.printStackTrace(); publicjava.sql.ResultSetquery(Stringsql)throwsSQLException{ returnstat.executeQuery(sql); *執(zhí)行 *@paramsql *@return *@throwsSQLException publicBooleanexecute(Stringsql)throwsSQLException{ returnstat.execute(sql);packagemenuItem_jiemian;importjava.awt.Color;importjava.awt.Font;importjava.awt.Window;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.awt.event.WindowAdapter;importjava.sql.ResultSet;importjavax.swing.JButton;importjavax.swing.JFrame;importjavax.swing.JLabel;importjavax.swing.JPanel;importjavax.swing.JTextField;importjavax.swing.WindowConstants;importdb.connectDb;importjiemian.Main;publicclasspersonInformationextendsJFrameimplementsActionListener{ //學(xué)號(hào) privateJLabeljl_student_number; privateJTextFieldjt_student_number; privateJButtonjb_student_number;// privateJLabeljl_student_name;// privateJButtonjb_student_name; //姓名 privateJLabeljl_name; privateJTextFieldjt_name; //性別 privateJLabeljl_sex; privateJTextFieldjt_sex; //民族 privateJLabeljl_nation; privateJTextFieldjt_nation; //照片 privateJLabeljl_photo; privateJLabelphoto; //學(xué)院 privateJLabeljl_xueyuan; privateJTextFieldjt_xueyuan; //專業(yè) privateJLabeljl_zhuanye; privateJTextFieldjt_zhuanye; //班級(jí) privateJLabeljl_banji; privateJTextFieldjt_banji; //聯(lián)系方式 privateJLabeljl_mobile_phone; privateJTextFieldjt_mobile_phone; //QQ privateJLabeljl_qq_number; privateJTextFieldjt_qq_number; //郵編 privateJLabeljl_youbian; privateJTextFieldjt_youbian; //父母姓名 privateJLabeljl_father; privateJLabeljl_mather; privateJTextFieldjt_father; privateJTextFieldjt_mather; //家庭住址 privateJLabeljl_home_address; privateJTextFieldjt_home_address; //備注 privateJLabeljl_jiangcheng;privateJTextFieldjt_jiangcheng; //窗體事件 publicpersonInformation(){ addWindowListener(newWindowAdapter(){ publicvoidWindowClose(Windowevent){ personInformation.this.dispose(); Fontkaiti1=newFont("kaiti",Font.BOLD,20); Fontkaiti2=newFont("kaiti",Font.BOLD,16); JPaneljPanel=newJPanel(); this.setContentPane(jPanel);// GridLayoutlayout=newGridLayout(3,0);//定義grid布局// jPanel.setLayout(layout);//向面板中添加布局 this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); jPanel.setOpaque(false); setTitle("學(xué)生信息查詢"); setBounds(250,50,900,600); this.setResizable(false);//設(shè)置窗體不可以調(diào)整大小 this.setLayout(null); jl_student_number=newJLabel("學(xué)號(hào):"); jl_student_number.setBounds(250,25,80,30); jl_student_number.setFont(kaiti1); this.add(jl_student_number); jt_student_number=newJTextField(); jt_student_number.setBounds(320,25,170,30); jt_student_number.setFont(kaiti1); this.add(jt_student_number); jb_student_number=newJButton("查詢"); jb_student_number.setBounds(500,25,100,30); jb_student_number.setFont(kaiti1); jb_student_number.addActionListener(this); this.add(jb_student_number); jl_name=newJLabel("姓名:"); jl_name.setBounds(50,80,80,30); jl_name.setFont(kaiti1); this.add(jl_name); jt_name=newJTextField(); jt_name.setBounds(120,80,120,30); jt_name.setFont(kaiti2); jt_name.setHorizontalAlignment(JTextField.CENTER); this.add(jt_name); jl_sex=newJLabel("性別:"); jl_sex.setBounds(270,80,80,30); jl_sex.setFont(kaiti1); this.add(jl_sex); jt_sex=newJTextField(); jt_sex.setBounds(340,80,40,30); jt_sex.setFont(kaiti2); jt_sex.setHorizontalAlignment(JTextField.CENTER); this.add(jt_sex); jl_nation=newJLabel("民族:"); jl_nation.setBounds(410,80,80,30); jl_nation.setFont(kaiti1); this.add(jl_nation); jt_nation=newJTextField(); jt_nation.setBounds(480,80,120,30); jt_nation.setFont(kaiti2); jt_nation.setHorizontalAlignment(JTextField.CENTER); this.add(jt_nation); jl_photo=newJLabel("照片:"); jl_photo.setBounds(630,80,80,30); jl_photo.setFont(kaiti1); this.add(jl_photo); photo=newJLabel(); photo.setBounds(680,80,100,120); photo.setBackground(Color.black); this.add(photo); jl_xueyuan=newJLabel("學(xué)院:"); jl_xueyuan.setBounds(50,150,80,30); jl_xueyuan.setFont(kaiti1); this.add(jl_xueyuan); jt_xueyuan=newJTextField(); jt_xueyuan.setBounds(120,150,120,30); jt_xueyuan.setFont(kaiti2); jt_xueyuan.setHorizontalAlignment(JTextField.CENTER); this.add(jt_xueyuan); jl_zhuanye=newJLabel("專業(yè):"); jl_zhuanye.setBounds(270,150,80,30); jl_zhuanye.setFont(kaiti1); this.add(jl_zhuanye); jt_zhuanye=newJTextField(); jt_zhuanye.setBounds(340,150,180,30); jt_zhuanye.setFont(kaiti2); jt_zhuanye.setHorizontalAlignment(JTextField.CENTER); this.add(jt_zhuanye); jl_banji=newJLabel("班級(jí):"); jl_banji.setBounds(540,150,80,30); jl_banji.setFont(kaiti1); this.add(jl_banji); jt_banji=newJTextField(); jt_banji.setBounds(610,150,83,30); jt_banji.setFont(kaiti2); jt_banji.setHorizontalAlignment(JTextField.CENTER); this.add(jt_banji); jl_mobile_phone=newJLabel("聯(lián)系方式:"); jl_mobile_phone.setBounds(50,210,100,30); jl_mobile_phone.setFont(kaiti1); this.add(jl_mobile_phone); jt_mobile_phone=newJTextField(); jt_mobile_phone.setBounds(160,210,180,30); jt_mobile_phone.setFont(kaiti2); jt_mobile_phone.setHorizontalAlignment(JTextField.CENTER); this.add(jt_mobile_phone); jl_qq_number=newJLabel("QQ號(hào):"); jl_qq_number.setBounds(360,210,80,30); jl_qq_number.setFont(kaiti1); this.add(jl_qq_number); jt_qq_number=newJTextField(); jt_qq_number.setBounds(425,210,180,30); jt_qq_number.setFont(kaiti2); jt_qq_number.setHorizontalAlignment(JTextField.CENTER); this.add(jt_qq_number); jl_youbian=newJLabel("郵編:"); jl_youbian.setBounds(625,210,80,30); jl_youbian.setFont(kaiti1); this.add(jl_youbian); jt_youbian=newJTextField(); jt_youbian.setBounds(720,210,100,30); jt_youbian.setFont(kaiti2); jt_youbian.setHorizontalAlignment(JTextField.CENTER); this.add(jt_youbian); jl_father=newJLabel("父親:"); jl_father.setBounds(50,270,80,30); jl_father.setFont(kaiti1); this.add(jl_father); jt_father=newJTextField(); jt_father.setBounds(130,270,100,30); jt_father.setFont(kaiti2); jt_father.setHorizontalAlignment(JTextField.CENTER); this.add
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度海參產(chǎn)業(yè)鏈供應(yīng)鏈金融解決方案合同3篇
- 2025年鋼廠爐渣熱能回收利用合同范本2篇
- 2025版五星級(jí)酒店餐飲部員工勞務(wù)合作協(xié)議3篇
- 二零二五年度畜牧飼養(yǎng)技術(shù)培訓(xùn)與推廣合作協(xié)議3篇
- 2025年度電子商務(wù)平臺(tái)個(gè)人勞務(wù)用工合同模板
- 二零二五年度車輛租賃與租賃期限調(diào)整服務(wù)合同3篇
- 二零二五年度橙子產(chǎn)業(yè)投資與融資合作協(xié)議3篇
- 二零二五年度廚具行業(yè)綠色供應(yīng)鏈合作框架協(xié)議3篇
- 2025年度網(wǎng)絡(luò)安全防護(hù)解決方案采購(gòu)合同范本5篇
- 2025年度個(gè)人購(gòu)房稅費(fèi)繳納協(xié)議書2篇
- 家長(zhǎng)心理健康教育知識(shí)講座
- 煤礦復(fù)工復(fù)產(chǎn)培訓(xùn)課件
- GB/T 292-2023滾動(dòng)軸承角接觸球軸承外形尺寸
- 2024年九省聯(lián)考高考數(shù)學(xué)卷試題真題答案詳解(精校打?。?/a>
- 軍人結(jié)婚函調(diào)報(bào)告表
- 民用無(wú)人駕駛航空器實(shí)名制登記管理規(guī)定
- 北京地鐵6號(hào)線
- 航空油料計(jì)量統(tǒng)計(jì)員(初級(jí))理論考試復(fù)習(xí)題庫(kù)大全-上(單選題匯總)
- 諒解書(標(biāo)準(zhǔn)樣本)
- 西班牙語(yǔ)構(gòu)詞.前后綴
- 《工程測(cè)試技術(shù)》全套教學(xué)課件
評(píng)論
0/150
提交評(píng)論