基于Java的用戶注冊(cè)管理系統(tǒng)實(shí)訓(xùn)報(bào)告_第1頁(yè)
基于Java的用戶注冊(cè)管理系統(tǒng)實(shí)訓(xùn)報(bào)告_第2頁(yè)
基于Java的用戶注冊(cè)管理系統(tǒng)實(shí)訓(xùn)報(bào)告_第3頁(yè)
基于Java的用戶注冊(cè)管理系統(tǒng)實(shí)訓(xùn)報(bào)告_第4頁(yè)
基于Java的用戶注冊(cè)管理系統(tǒng)實(shí)訓(xùn)報(bào)告_第5頁(yè)
已閱讀5頁(yè),還剩9頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

課題:用戶注冊(cè)管理系統(tǒng)第1章概述第2章需求分析第3章功能設(shè)計(jì)第4章設(shè)計(jì)思路第5章關(guān)鍵代碼第6章設(shè)計(jì)總結(jié)第1章概述1.JAVA簡(jiǎn)介:Java是一種簡(jiǎn)單易用、完全面向?qū)ο?、具有平臺(tái)無(wú)關(guān)性且安全可靠的主要面向Internet的開發(fā)工具。自從1995年正式問(wèn)世以來(lái),Java的快速發(fā)展已經(jīng)讓整個(gè)Web世界發(fā)生了翻天覆地的變化。Java無(wú)處不在,可應(yīng)用于任何地方、任何領(lǐng)域。Oracle公司董事長(zhǎng)和首席執(zhí)行官LarruEllison說(shuō)過(guò);“Java正在進(jìn)入企業(yè)、家庭和學(xué)校。它正像Internet本身一樣成為普遍存在的技術(shù)?!?.2運(yùn)行環(huán)境系統(tǒng):Windows7JDK版本:8。0開發(fā)平臺(tái):NetBeans數(shù)據(jù)庫(kù):SQL2005第2章需求分析任何一個(gè)優(yōu)秀的程序都有一個(gè)優(yōu)秀的登錄注冊(cè)界面,因?yàn)槟芙o用戶好的第一印象,所以一個(gè)好的注冊(cè)界面對(duì)一個(gè)程序來(lái)說(shuō)很重要,是必不可少的。第3章功能設(shè)計(jì)1、能夠?qū)崿F(xiàn)用戶的快速注冊(cè),而且畫面簡(jiǎn)單易懂。第4章設(shè)計(jì)思路4.1設(shè)計(jì)思路登錄界面點(diǎn)擊注冊(cè),跳轉(zhuǎn)到注冊(cè)界面,提供了(用戶名,密碼,郵箱,電話,真實(shí)姓名,身份證號(hào))等功能。4。2數(shù)據(jù)庫(kù)設(shè)計(jì)數(shù)據(jù)庫(kù)在一個(gè)信息管理系統(tǒng)中占有非常重要的地位,數(shù)據(jù)庫(kù)結(jié)構(gòu)設(shè)計(jì)的好壞將直接對(duì)應(yīng)用系統(tǒng)的效率,以及實(shí)現(xiàn)的效果產(chǎn)生影響。合理的數(shù)據(jù)庫(kù)結(jié)構(gòu)設(shè)計(jì)可以提高數(shù)據(jù)存儲(chǔ)的效率,保證數(shù)據(jù)的完整和一致。每個(gè)表的邏輯功能結(jié)構(gòu)設(shè)計(jì)如下:普通用戶信息表User,記錄普通用戶的信息管理員用戶信息表Administer,記錄管理員信息。連接數(shù)據(jù)庫(kù)的代碼:代碼1:Connectionconn=null;//倉(cāng)U建Connection對(duì)象try{Class。forName(”com。microsoft.sqlserver.jdbc.SQLServerDriver”);//加載數(shù)據(jù)庫(kù)驅(qū)動(dòng)Stringurl="jdbc:sqlserver://localhost:1433;databaseName=軟件注冊(cè)";//指定連接數(shù)據(jù)庫(kù)的URLStringuser="sa”;//指定連接數(shù)據(jù)庫(kù)的用戶名StringpassWord="123456”;//指定連接數(shù)據(jù)庫(kù)的密碼conn=DriverManager。getConnection(url,user,passWord);Statementstatement=conn.createStatement();ResultSetrs=statement.executeQuery("SELECT*FROM用戶表");//Stringsql=newString(”SELECT*FROMImportTableHistory”);//rs=statement.executeQuery(sql);//jTi=0,j=0;//jTable1。SET//JOptionPane。showMessageDialog(null,jTable1.getColumnName(1));//jTable1.SETCwhile(rs。next()){jTable1.setValueAt(rs.getString(1),i,j);jTable1。setValueAt(rs。getString(2),i,j+1);jTable1。setValueAt(rs.getString(3),i,j+2);jTable1。setValueAt(rs.getString(4),i,j+3);jTable1。setValueAt(rs。getString(5),i,j+4);jTableLsetValueAt(rs。getString(6),i,j+5);i=i+1;//j=0;}//JTableHeadert1=newJTableHeader();//t1.getColumnModel();//jTable1.setTableHeader(t1);rs。close();statement.close();第5章運(yùn)行界面及關(guān)鍵代碼publicclassDengluJFrameextendsjavax.swing。JFrame{/**CreatesnewformdengluJFrame/publicDengluJFrame() {initComponents();}/**Thismethodiscalledfromwithintheconstructortoinitializetheform.WARNING: DoNOTmodifythiscode.ThecontentofthismethodisalwaysregeneratedbytheFormEditor./@SuppressWarnings(”unchecked”)//〈editor—folddefaultstate=”collapsed"desc=”GeneratedCode”〉privatevoidinitComponents(){jTextField1=newjavax.swing.JTextField();jTextField3=newjavax.swing.JTextField();jTextField4=newjavax。swing。JTextField();jButton1=newjavax.swing.JButton();jButton2=newjavax。swing.JButton();jLabel1=newjavax.swing。JLabel();jLabel2=newjavax。swing。JLabel();setDefaultCloseOperation(javaxswing。WindowConstants。EXIT_ON_CLOSE);jTextFieldLsetText("用戶名”);jTextField1.addActionListener(newjava。awt。event。ActionListener() {publicvoidactionPerformed(java.awt。event。ActionEventevt){jTextField1ActionPerformed(evt);}});jButton1。setText(”注冊(cè)");jButton1.addActionListener(newjava.awt.event.ActionListener(){publicvoidactionPerformed(java.awt.event。ActionEventevt){jButton1ActionPerformed(evt);}});jButton2.setText("登錄");jLabelLsetText(”用戶名");jLabel2。setText(”密碼”);javax.swingoGroupLayoutlayout=newjavax.swing.GroupLayout(getContentPane());getContentPane()。setLayout(layout);layout.setHorizontalGroup(layout。createParallelGroup(javax.swing.GroupLayout。Alignment.LEADING).addGroup(layout。createSequentialGroup().addGap(61,61,61).addGroup(layout。createParallelGroup(javax.swing。GroupLayout.Alignment。LEADING).addGroup(layout.createSequentialGroup().addComponent(jLabel1)。addGap(0,4,Short。MAX_VALUE)).addComponent(jLabel2,javax。swing.GroupLayout。DEFAULT_SIZE,javax。swing.GroupLayout.DEFAULT_SIZE,Short.MAX_VALUE)).addPreferredGap(javax。swing.LayoutStyle。ComponentPlacement。RELATED)。addComponent(jTextField1,javax。swing。GroupLayout。PREFERRED_SIZE,0,javax.swing。GroupLayout.PREFERRED_SIZE)。addGap(47,47,47)。addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,false)。addComponent(jTextField4,javax.swing。GroupLayout.DEFAULT_SIZE,122,ShortoMAX_VALUE).addComponent(jTextField3)).addGap(126,126,126))。addGroup(layout.createSequentialGroup()。addGap(50,50,50)。addComponent(jButton1)。addGap(68,68,68)。addComponent(jButton2).addGap(106,106,106)));layout.setVerticalGroup(layout.createParallelGroup(javax。swing。GroupLayout.Alignment。LEADING)。addGroup(layoutocreateSequentialGroup()。addGap(51,51,51)。addGroup(layout.createParallelGroup(javax。swing.GroupLayout。AlignmentoBASELINE)。addComponent(jTextField1,javax。swingoGroupLayout。PREFERRED_SIZE,javax.swing.GroupLayout。DEFAULT_SIZE,javax.swing.GroupLayout。PREFERRED_SIZE).addComponent(jTextField3,javax。swingoGroupLayout.PREFERRED_SIZE,javax.swingoGroupLayoutoDEFAULT_SIZE,javax.swing.GroupLayout。PREFERRED_SIZE).addComponent(jLabel1))。addGap(46,46,46)。addGroup(layout。createParallelGroup(javax。swingoGroupLayout.AlignmentoBASELINE)。addComponent(jTextField4,javax。swingoGroupLayout.PREFERRED_SIZE,javax.swingoGroupLayoutoDEFAULT_SIZE,javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(jLabel2))。addPreferredGap(javax。swing。LayoutStyle.ComponentPlacement。RELATED,94,Short。MAX_VALUE)。addGroup(layout.createParallelGroup(javax.swing.GroupLayout。AlignmentoBASELINE)。addComponent(jButton1)。addComponent(jButton2)).addGap(44,44,44)));pack();}//〈/editor—fold>privatevoidjButton1ActionPerformed(java。awt。event。ActionEventevt){//TODOaddyourhandlingcodehere:MainJFramezc=newMainJFrame();zc.setVisible(true);}privatevoidjTextField1ActionPerformed(java。awt。event.ActionEventevt) {//TODOaddyourhandlingcodehere:}/***@paramargsthecommandlinearguments*/publicstaticvoidmain(Stringargs[]){/*SettheNimbuslookandfeel*///〈editor—folddefaultstate=”collapsed"desc=”Lookandfeelsettingcode(optional)”〉/*IfNimbus(introducedinJavaSE6)isnotavailable,staywiththedefaultlookandfeel.*Fordetailsseehttp:///javase/tutorial/uiswing/lookandfeel/plaf。html*/try{for(javax。swing.UIManager。LookAndFeelInfoinfo:javax.swing。UIManager.getInstalledLookAndFeels()) {if("Nimbus".equals(info.getName())){javax.swingoUIManager。setLookAndFeel(info。getClassName());break;}}}catch(ClassNotFoundExceptionex){java.util.logging.Logger。getLogger(DengluJFrame.class。getName())。log(java。util。loggingoLevel.SEVERE,null,ex);}catch(InstantiationExceptionex){javaoutil.logging.Logger。getLogger(DengluJFrame。classogetName()).log(java。util。logging.LeveloSEVERE,null,ex);}catch(IllegalAccessExceptionex){javaoutilologging.Logger.getLogger(DengluJFrame。class.getName())。log(javaoutilologgingoLeveloSEVERE,null,ex);}catch(javaxoswingoUnsupportedLookAndFeelExceptionex){javaoutil.loggingoLoggerogetLogger(DengluJFrame.class.getName()).log(java.utilologging.LeveloSEVERE,null,ex);//</editor—fold>//</editor—fold〉/*Createanddisplaytheform*/java。awt.EventQueue.invokeLater(newRunnable(){publicvoidrun(){newDengluJFrame()。setVisible(true);}});}//Variablesdeclaration-donotmodifyprivatejavax。swing.JButtonjButton1;privatejavax.swing。JButtonjButton2;privatejavax。swing.JLabeljLabel1;privatejavax。swing。JLabeljLabel2;privatejavax.swing。JTextFieldjTextField1;privatejavax。swing。JTextFieldjTextField3;privatejavax。swing。JTextFieldjTextField4;//Endofvariablesdeclaration}publicclassMainJFrameextendsjavax。swing。JFrame{/***CreatesnewformmianJFrame*/publicMainJFrame() {initComponents();}/**Thismethodiscalledfromwithintheconstructortoinitializetheform。WARNING:DoNOTmodifythiscode。Thecontentofthismethodisalways*regeneratedbytheFormEditor。*/@SuppressWarnings(”unchecked”)//<editor—folddefaultstate=”collapsed”desc=”GeneratedCode"〉privatevoidinitComponents() {jLabel1=newjavax。swing。JLabel();jLabel2=newjavax.swing.JLabel();jLabel3=newjavax。swing。JLabel();jLabel4=newjavax.swing.JLabel();jLabel5=newjavax.swing□JLabel();jLabel6=newjavax.swing.JLabel();jTextField1=newjavax。swing.JTextField();jButton1=newjavax.swing□JButton();jButton2=newjavax.swing。JButton();jTextField7=newjavax.swing□JTextField();

jTextField8=newjavax。swing。JTextField();jTextField9=newjavax.swing。JTextField();jTextFieldlO=newjavax.swing。JTextField();jTextFieldll=newjavax.swing。JTextField();setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);jLabell。setText(”用戶名”);jLabel2.setText(”密碼”);jLabel3。setText("郵箱");jLabel4.setText("電話");jLabel5。setText("真實(shí)姓名");jLabel6。setText("身份證號(hào)”);jButton1.setText("提交");jButton1。addActionListener(newjava.awt。event.ActionListener() {publicvoidactionPerformed(java。awt.event。ActionEventevt){jButton1ActionPerformed(evt);}});jButton2。setText(”取消");javax.swing.GroupLayoutlayout=newjavax。swing。GroupLayout(getContentPane());getContentPane().setLayout(layout);layout.setHorizontalGroup(layoutocreateParallelGroup(javax.swing。GroupLayout.Alignment。LEADING).addGroup(layout。createSequentialGroup().addGap(79,79,79).addGroup(layout。createParallelGroup(javax.swing。GroupLayout。AlignmentoLEADING,false).addGroup(layout.createSequentialGroup().addComponent(jButton1)。addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,61,Short.MAX_VALUE)。addComponent(jButton2)).addGroup(layout.createSequentialGroup()。addGroup(layoutocreateParallelGroup(javax。swing.GroupLayout.Alignment。LEADING)。addComponent(jLabel1)。addComponent(jLabel2)。addComponent(jLabel3).addComponent(jLabel4)。addComponent(jLabel5).addComponent(jLabel6)).addGap(35,35,35)。addGroup(layout.createParallelGroup(javax.swing.GroupLayout。AlignmentoLEADING,LEADING,false)。addComponent(jTextField1)。addComponent(jTextField7)。addComponent(jTextField8)。addComponent(jTextField9).addComponent(jTextField10).addComponent(jTextFieldll,javax。swing。GroupLayout.DEFAULT_SIZE,92,Short。MAX_VALUE))))。addContainerGap(146,Short.MAX_VALUE)));layout.setVerticalGroup(layoutocreateParallelGroup(javax.swing。GroupLayout。Alignment.LEADING).addGroup(layout.createSequentialGroup()。addGap(24,24,24)。addGroup(layout.createParallelGroup(javax。swing。GroupLayout.Alignment。BASELINE)。addComponent(jLabel1)。addComponent(jTextField1,javax.swing.GroupLayout.PREFERRED_SIZE,javax.swing。GroupLayout。DEFAULT_SIZE,javax.swing。GroupLayout.PREFERRED_SIZE)).addGap(18,18,18)。addGroup(layout。createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jLabel2).addComponent(jTextField7,javax.swing。GroupLayout.PREFERRED_SIZE,javax.swing。GroupLayout.DEFAULT_SIZE,javax。swing。GroupLayout.PREFERRED_SIZE))。addGap(18,18,18)。addGroup(layout。createParallelGroup(javax.swing.GroupLayout。Alignment.LEADING)。addComponent(jLabel3).addComponent(jTextField8,javax.swing。GroupLayout。PREFERRED_SIZE,javax.swing。GroupLayout。DEFAULT_SIZE,javax.swing.GroupLayout。PREFERRED_SIZE)).addGap(18,18,18).addGroup(layout。createParallelGroup(javax。swing.GroupLayout.Alignment.LEADING).addComponent(jLabel4).addComponent(jTextField9,javax。swing.GroupLayout.PREFERRED_SIZE,javax。swing.GroupLayout。DEFAULT_SIZE,javax。swing。GroupLayout.PREFERRED_SIZE))。addGap(18,18,18).addGroup(layout。createParallelGroup(javax。swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel5)。addComponent(jTextField10,javax.swing.GroupLayout.PREFERRED_SIZE,javax.swing.GroupLayout.DEFAULT_SIZE,javax.swing.GroupLayout.PREFERRED_SIZE))。addGap(18,18,18).addGroup(layout.createParallelGroup(javax.swing。GroupLayout.Alignment。BASELINE).addComponent(jLabel6)°addComponent(jTextField11,javax.swing.GroupLayout。PREFERRED_SIZE,javax。swing.GroupLayout.DEFAULT_SIZE,javax。swing.GroupLayout。PREFERRED_SIZE)).addPreferredGap(javax。swing.LayoutStyle.ComponentPlacement.RELATED,27,Short.MAX_VALUE).addGroup(layout.createParallelGroup(javax.swing.GroupLayout。Alignment.BASELINE).addComponent(jButton1).addComponent(jButton2)).addContainerGap()));pack();}//</editor—fold〉privatevoidjButton1ActionPerformed(java.awtevent。ActionEventevt){//TODOaddyourhandlingcodehere:NewJFramexx=newNewJFrame();xx。setVisible(true);}/***@paramargsthecommandlinearguments*/publicstaticvoidmain(Stringargs[]){/*SettheNimbuslookandfeel*///〈editor-folddefaultstate="collapsed"desc="Lookandfeelsettingcode(optional)">/*IfNimbus(introducedinJavaSE6)isnotavailable, staywiththedefaultlookandfeel。*Fordetailsseehttp:///javase/tutorial/uiswing/lookandfeel/plaf。html*/try{for(javaxoswing。UIManager.LookAndFeelInfoinfo:javax.swing。UIManager。getInstalledLookAndFeels()){if("Nimbus".equals(info.getName())){javax。swing.UIManager.setLookAndFeel(info。getClassName());break;}}}catch(ClassNotFoundExceptionex){java。util。logging□Logger□getLogger(MainJFrame。class。getName()).log(java.util.logging.Level.SEVERE,null,ex);}catch(InstantiationExceptionex){java.util.logging。Logger□getLogger(MainJFrame。class.getName())。log(java。util。logging0Level.SEVERE,null,ex);}catch(IllegalAccessExceptionex) {java。util.logging.Logger。getLogger(MainJFrame.class.getName())。log(java.util.logging.Level.SEVERE,nul,lex);}catch(javax。swing□UnsupportedLookAndFeelExceptionex){java。util。logging.Logger。getLogger(MainJFrame.class.getName()).log(java.util.logging.Level。SEVERE,null,ex);}//</editor—fold〉//〈/editor-fold〉//</editor—fold〉

//</editor-fold>/*Createanddisplaytheform*/java.awt.EventQueue.invokeLater(newRunnable() {publicvoidrun(){newMainJFrame()。setVisible(true);}});}//Variablesdeclaration-donotmodifyprivatejavax.swing。JButtonjButtonl;privatejavax。swing.JButtonjButton2;privatejavax.swing。JLabeljLabell;privatejavax。privatejavax。privatejavax。privatejavax。privatejavax。privatejavax。privatejavax。privatejavax。privatejavax。swing.JLabeljLabel2;swing。JLabeljLabel3;swing.JLabeljLabel4;swing。swing。

swing。

swing。JLabeljLabel5;JLabeljLabel6;JTextFieldjTextField1;JTextFieldjTextField10;privatejavax.swing。JTextFieldjTextField11;privatejavax。swing。JTextFieldjTextField7;privatejavax.swing.JTextFieldjTextField8;privatejavax.swing。JTextFieldjTextField9;//EndofvariablesdeclarationpublicclassNewJFrameextendsjavax.swing.JFrame{/**CreatesnewformNewJFrame/publicNewJFrame(){initComponents();}/**Thismethodiscalledfromwithintheconstructortoinitializetheform。WARNING:DoNOTmodifythiscode。Thecontentofthismethodisalways*regeneratedbytheFormEditor.*/@SuppressWarnings("unchecked")//〈editor—folddefaultstate="collapsed”desc=”GeneratedCode"〉privatevoidinitComponents(){jTextField1=newjavax。swing。JTextField();setDefaultCloseOperation(javax.swing□WindowConstants。EXIT_ON_CLOSE);jTextField1。setText("注冊(cè)成功!”javax。swing。GroupLayoutlayout=newjavax。swing.GroupLayout(getContentPane());getContentPane().setLayout(layout);layout。setHorizontalGroup(layout.createParallelGroup(javax。swing。GroupLayout.Alignment。LEADING)。addGroup(layout。createSequentialGroup().addGap(91,91,91).addComponent(jTextField1,javax。swing.GroupLayout。PREFERRED_SIZE,143,javax。swingoGroupLayout。PREFERRED_SIZE)。addContainerGap(166,Short。MAX_VALUE)));layout.setVerticalGroup(layout.createParallelGroup(javax.swing。GroupLayout。Alignment.LEADING).addGroup(layoutocreateSequentialGroup().addGap(110,110, 110)。addComponent(jTextField1,javax.swing.GroupLayout.PREFERRED_SIZE,72,javax.swing。GroupLayout。PREFERRED_SIZE).addContainerGap(118,Short.MAX_VALUE)));pack();}//</editor—fold>/***@paramargsthecommandlinearguments*/publicstaticvoidmain(Stringargs[]){/*SettheNimbuslookandfeel*///〈editor-folddefaultstate=”collapsed”desc=”Lookandfeelsettingcode(optional)”>/*IfNimbus(introducedinJavaSE6)isnotavailable,staywiththedefaultlookandfeel。*Fordetailsseehttp:///javase/tutorial/uiswing/lookandfeel/plaf.html*/try{for(javax。swing.UIManager.LookAndFeelInfoinfo:javax。swing。UIManager。g

溫馨提示

  • 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ì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論