NetBeans实现学生信息管理系统源码1_第1页
NetBeans实现学生信息管理系统源码1_第2页
NetBeans实现学生信息管理系统源码1_第3页
NetBeans实现学生信息管理系统源码1_第4页
NetBeans实现学生信息管理系统源码1_第5页
已阅读5页,还剩65页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

PAGE

Developedby

GroupName:Water

StarReg.No:R3P3000005

SylviaReg.No:R3P3000045

JuneReg.No:R3P3000050

NIIT

PROJECTION

StudentInformationManagementSystem

StudentManagementSystemSoftware

BatchCode:

StartDate:08/03/2019

NameoftheCoordinator:ShahnawazAhmadKhan

NameoftheDeveloper:Ms.Water

EnglishName:Water

Name(Chinese&Ponyin):水(water)

EndDate:14/03/2019

DateofSubmission:18/03/2019

NIIT

CERTIFICATE

Thisistocertifythatthisreport,titled"_StudentInformationManagementSystem___",embodiestheoriginalworkdonebyPeterInpartialfulfillmentofhiscourserequirementatNIIT.

Coordinator:ShahnawazAhmadKhan

AssociateCoordinator:

Acknowledgement

IwouldliketothankourFacultyMr.ShahnawazandChineseassociateFacultyMs.LiFanfanforalltheirguidanceandsupportduringtheentirephaseofthisprojectdevelopmentwithoutwhichtheprojectwouldnothavebeencompleted.

SystemAnalysis

SystemSummary:Itisconvenientfortheuserstomanagestudentinformation.forexample:add,delete,updateandoverviewstudentinformation.

BusinessRules:

1,createdatabase,tablesandconstraints.

2,interfacedesign

3,implementthesourcecode

4,debugandtest

DataQuery:

createdatabaseSIMS

useSIMS

createtableuseinfo

(uidintprimarykeyidentity(101,1),

unamenchar(20)notnull,

upasswordnchar(10)default'00000',

urealnamenchar(20),

umobilnchar(15)

)

createtablestudentinfor

(sidintprimarykeyidentity(10001,1),

snamenchar(20)notnull,

sgenderchar(4),

sbirthdaynchar(15),

smobilnchar(15),

semilnchar(20),

sacademynchar(20),

smajornchar(20),

)

altertableuseinfo

addconstraintuniqunique(uname)

altertablestudentinfor

addconstraintununique(sname)

altertablestudentinfor

altercolumnsmobilchar(11)

altertableuseinfo

dropconstraintDF__useinfo__upasswo__108B795B

//HowtoUseUpdate、Insert、Select、deleteinCode

1)stat=con.prepareStatement("updatestudentinforsetsgender=?,sbirthday=?,smobil=?,semil=?,sacademy=?,smajor=?wheresid=?");

2)stat=con.prepareStatement("insertintouseinfovalues(?,?,?,?)");

3)ResultSetrs=stmt.executeQuery("SELECT*FROMuseinfo");

4)stat=con.prepareStatement("deletefromstudentinforwheresid=?");

InterfaceDesignforStudent_InformationManager__

Asthedevelopmentofthecomputer,moreandmoremanagementdependonthecomputer.

Forthisreason,wegroupWaterdesignastudentinformationmanagementforthestudentinformationmanagementsystem.Itisconvenientforthemanagertooverview,add,update,deletestudentinformation.

Configuration

Hardware:Intel(R)Pentium(R)DualE21802.1GHz

1.20GHz3.00GBRAM

250GB7200RPMHardDisk

10/100NIC

OpticalMouse

Keyboard

17"ColorMonitor

OperatingSystem:MicrosoftWindows07

Software:NetbeansIDE7.2.1、MicrosoftSQLServer2019

IndividualProjectSchedule

SrNo

ActivityDescription

Planneddateof

Completion

ActualDate

Remarks

1

CreateDatabase

09/03/2019

09/03/2019

NoProblem

2

InterfaceDesign

09/03/2019

09/03/2019

NoProblem

3

InterfaceImplementation

11/03/2019

11/03/2019

Noproblem

4

FunctionImplementation

13/03/2019

11/03/2019

Noproblem

5

Debugging

13/03/2019

13/03/2019

ManyProblemshadbeensolved

6

7

8

9

10

11

SourceCode

//loginGUIandthemainfunction

//StudentMain.java

packagestudentinformationmanagementsystem;

importjava.awt.*;

importjavax.swing.*;

importjava.awt.event.*;

importjava.sql.*;

importjavax.swing.UIManager;

publicclassStudentMainextendsJFrameimplementsActionListener

JLabelLtitle,Lname,Lpassword;

JButtonBlogin,Bexit,Lregister;

JTextFieldTFname;

JPasswordFieldTFpassword;

GridBagLayoutgbl;

GridBagConstraintsgbc;

GridLayoutgl;

Fontf1,f2,f3;

JPanelp1,p2;

Connectioncon;

PreparedStatementstat;

Statementstmt;

ResultSetrs;

publicStringname;

publicStudentMain(booleanflag)

//booleanf=f

super("StudentInformationManagementSystem");

this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

f1=newFont("宋体",1,25);

f2=newFont("宋体",1,20);

f3=newFont("宋体",1,18);

Ltitle=newJLabel("StudentInformationManagementSystem",JLabel.CENTER);

Ltitle.setVerticalAlignment(JLabel.CENTER);

Ltitle.setForeground(Color.red);

Lname=newJLabel("UserName",JLabel.CENTER);

Lpassword=newJLabel("UserPassword",JLabel.CENTER);

Lregister=newJButton("Register");

Ltitle.setFont(f1);

Lname.setFont(f2);

Lpassword.setFont(f2);

Lregister.setFont(f2);

TFname=newJTextField(15);

//TFname.setBounds(0,0,150,40);

TFname.setFont(f2);

TFpassword=newJPasswordField(15);

TFpassword.setFont(f2);

TFpassword.setEchoChar('*');

Blogin=newJButton("Login");

Blogin.setFont(f2);

Bexit=newJButton("Exit");

Bexit.setFont(f2);

p1=newJPanel();

p2=newJPanel();

gbl=newGridBagLayout();

gbc=newGridBagConstraints();

gl=newGridLayout(3,1);

p1.setLayout(gbl);

gbc.fill=GridBagConstraints.NONE;

gbc.insets=newInsets(0,0,11,10);

gbc.anchor=GridBagConstraints.CENTER;

gbc.gridwidth=1;

gbl.setConstraints(Lname,gbc);

p1.add(Lname);

gbc.gridwidth=GridBagConstraints.REMAINDER;

gbc.anchor=GridBagConstraints.LINE_START;

gbl.setConstraints(TFname,gbc);

p1.add(TFname);

gbc.gridwidth=1;

gbc.anchor=GridBagConstraints.CENTER;

gbl.setConstraints(Lpassword,gbc);

p1.add(Lpassword);

gbc.gridwidth=GridBagConstraints.REMAINDER;

gbc.anchor=GridBagConstraints.CENTER;

gbl.setConstraints(TFpassword,gbc);

p1.add(TFpassword);

p2.setLayout(newFlowLayout(FlowLayout.CENTER,20,0));

p2.add(Blogin);

p2.add(Bexit);

p2.add(Lregister);

this.setLayout(gl);

this.add(Ltitle);

this.add(p1);

this.add(p2);

Blogin.addActionListener(this);

Bexit.addActionListener(this);

Lregister.addActionListener(this);

DimensionscreenSize=Toolkit.getDefaultToolkit().getScreenSize();

setBounds((screenSize.width-365)/2,(screenSize.height-449)/2,550,350);

this.setVisible(flag);

publicvoidactionPerformed(ActionEventae)

if(ae.getActionCommand()=="Exit")

System.exit(0);

if(ae.getActionCommand()=="Login")

name=TFname.getText();

Stringpassword=TFpassword.getText();

if(name.equals("")||password.equals(""))

JOptionPane.showMessageDialog(null,"UserName,UserPasswordisnotnull");

else{

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

con=DriverManager.getConnection("jdbc:odbc:DataSource","","");

Statementstmt=con.createStatement();

ResultSetrs=stmt.executeQuery("SELECT*FROMuseinfo");

booleanisfind=false;

while(rs.next())

if(name.equals(rs.getString(2)))

isfind=true;

if(password.equals(rs.getString(3)))

this.dispose();

newFunction(name);

TFname.setText("");

TFpassword.setText("");

else

JOptionPane.showMessageDialog(null,"Passwordisworng!");

break;

if(isfind==false)

JOptionPane.showMessageDialog(null,"NotExsittheUser,PleaseRegister!");

con.close();

}catch(Exceptione)

System.out.println("Error"+e.getMessage());

if(ae.getActionCommand()=="Register")

newAddUser();

publicstaticvoidmain(String[]args){

//TODOcodeapplicationlogichere

try

UIManager.setLookAndFeel(newcom.sun.java.swing.plaf.windows.WindowsLookAndFeel());

catch(Exceptione)

newStudentMain(true);

//FunctionGUI

//Function.java

packagestudentinformationmanagementsystem;

importjavax.swing.*;

importjava.awt.*;

importjava.awt.event.*;

importjava.sql.*;

importjavax.swing.table.*;

importjava.util.*;

publicclassFunctionextendsJFrameimplementsActionListener

JMenufunmenu1,funmenu2,funmenu3;

JMenuItemmenuitempwd,menulogout,menuexit,menuoverview;

JPanelfunpl1,funpl2,funpl3,funpl4,funpl5,funpl6;

JLabelfunlb1,funlb2;

JButtonfunjbadd,funjbdelete,funjbupdate,funjboverview,funjbok,funjbcancel;

JMenuBarfunmenubar;

JComboBoxfunjcb1;

JTextFieldfunjtf1,funjtf2;

Fontfunf1;

JScrollPanejsp;

JTablefunjtb;

JScrollPanefunjsp;

Connectioncon;

Statementstmt;

PreparedStatementstat;

ResultSetrs;

ResultSetMetaDatarsmd;

publicStringss;

Function(Stringstr)

super("StudentManagementSystem");

this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

ss=str;

setLayout(null);

funjsp=newJScrollPane();

funf1=newFont("Arial",Font.BOLD|Font.ITALIC,20);

funjcb1=newJComboBox();

funjcb1.addItem("selectbyID");

funjcb1.addItem("selectbyname");

funjcb1.addActionListener(this);

funpl2=newJPanel();

funpl2.setLayout(newFlowLayout(FlowLayout.CENTER,0,3));

funpl3=newJPanel();

funpl3.setLayout(newFlowLayout(FlowLayout.LEFT,20,3));

funpl4=newJPanel();

funpl4.setLayout(newFlowLayout(FlowLayout.CENTER,20,3));

funpl5=newJPanel();

funpl5.setLayout(newGridLayout(4,1));

funpl6=newJPanel();

funpl6.setLayout(newFlowLayout());

funmenubar=newJMenuBar();

funmenubar.setBounds(0,0,490,30);

funlb1=newJLabel("WelcomeToTheSystem!",JLabel.CENTER);

funlb1.setFont(funf1);

Objecttablesize[][]=newObject[20][8];

for(inti=0;i<20;i++)

for(intj=0;j<8;j++)

tablesize[i][j]=null;

Stringcolumn[]={"sid","sname","sgender","sbirth","smobil","semil","sacademy","smajor"};

funjtb=newJTable(tablesize,column);

funjtb.setShowGrid(true);

funjtf1=newJTextField(25);

funjtf1.addActionListener(this);

funjbadd=newJButton("Add");

funjbadd.addActionListener(this);

funjbdelete=newJButton("Delete");

funjbdelete.addActionListener(this);

funjboverview=newJButton("Overview");

funjboverview.addActionListener(this);

funjbupdate=newJButton("Update");

funjbupdate.addActionListener(this);

funjbok=newJButton("OK");

funjbok.addActionListener(this);

funjbcancel=newJButton("Cancel");

funjbcancel.addActionListener(this);

funmenu1=newJMenu("usermanagement");

funmenu2=newJMenu("overview");

funmenu3=newJMenu("help");

menuoverview=newJMenuItem("checkmyinfomation",JMenuItem.CENTER);

menuoverview.addActionListener(this);

menuitempwd=newJMenuItem("passwordmanagement",JMenuItem.CENTER);

menuitempwd.addActionListener(this);

funmenu1.add(menuoverview);

funmenu1.add(menuitempwd);

menulogout=newJMenuItem("LogOut",JMenuItem.CENTER);

menulogout.addActionListener(this);

funmenu1.add(menulogout);

menuexit=newJMenuItem("Exit",JMenuItem.CENTER);

menuexit.addActionListener(this);

funmenu1.add(menuexit);

funmenubar.add(funmenu1);

funmenubar.add(funmenu2);

funmenubar.add(funmenu3);

funpl2.add(funlb1);

funpl3.add(funjcb1);

funpl3.add(funjtf1);

funpl3.add(funjbok);

funpl3.add(funjbcancel);

funpl4.add(funjboverview);

funpl4.add(funjbadd);

funpl4.add(funjbdelete);

funpl4.add(funjbupdate);

funpl5.add(funpl2);

funpl5.add(funpl3);

funpl5.add(funpl4);

funpl5.setBounds(0,50,475,120);

funpl6.add(newJScrollPane(funjtb));

funpl6.setBounds(10,165,455,500);

add(funmenubar);

add(funpl5);

add(funpl6);

this.setVisible(true);

DimensionscreenSize=Toolkit.getDefaultToolkit().getScreenSize();

setBounds((screenSize.width-450)/2,(screenSize.height-550)/2,490,580);

publicvoidactionPerformed(ActionEventae)

//updatepassword

Strings=ae.getActionCommand();

TableModelmdl=funjtb.getModel();

if(ae.getSource().equals(menuitempwd))

try{

UpdatePasswordup=newUpdatePassword();

up.TFuname.setText(ss);

}catch(Exceptione)

System.out.println("Error:"+e);

elseif(ae.getSource().equals(funjboverview))

try

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stmt=con.createStatement();

rs=stmt.executeQuery("select*fromstudentinfor");

Stringrows[]={"","","","","","","",""};

while(rs.next())

for(inti=0;i<8;i++)

rows[i]=rs.getString(i+1);

mdl.setValueAt(rows[i],rs.getRow()-1,i);

con.close();

funjtb.repaint();

catch(Exceptione)

System.out.println("Error:"+e);

elseif(ae.getSource().equals(menuoverview))

try

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stmt=con.createStatement();

rs=stmt.executeQuery("selectuid,uname,urealname,umobilfromuseinfowhereuname='"+ss+"'");

rs.next();

Stringid=Integer.toString(rs.getInt(1));

Stringname=rs.getString(2);

Stringrealname=rs.getString(3);

Stringmobil=rs.getString(4);

UserInformationui=newUserInformation(true);

ui.TFuid.setText(id);

ui.TFuname.setText(name);

ui.TFurealname.setText(realname);

ui.TFumobil.setText(mobil);

con.close();

}catch(Exceptione)

System.out.println("Error:"+e);

elseif(ae.getSource().equals(menulogout))

this.dispose();

newStudentMain(true);

elseif(ae.getSource().equals(menuexit))

System.exit(1);

elseif(ae.getSource()==funjbok)

if(funjtf1.getText().equals(""))

JOptionPane.showMessageDialog(null,"PleaseInputTheStudentIDorStudentName");

elseif(funjcb1.getSelectedItem().equals("selectbyID"))

intsid=Integer.parseInt(funjtf1.getText());

try

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stmt=con.createStatement();

rs=stmt.executeQuery("select*fromstudentinforwheresid="+sid);

Stringrows[]={"","","","","","","",""};

if(rs.next())

intid=rs.getInt(1);

StringID=Integer.toString(id);

Stringname=rs.getString(2);

Stringgender=rs.getString(3);

Stringbirth=rs.getString(4);

Stringmobil=rs.getString(5);

Stringemail=rs.getString(6);

Stringacademy=rs.getString(7);

Stringmajor=rs.getString(8);

StudentInformationsi=newStudentInformation();

si.TFid.setText(ID);

si.TFname.setText(name);

si.TFsex.setText(gender);

si.TFbirthday.setText(birth);

si.TFmobil.setText(mobil);

si.TFemail.setText(email);

si.TFacademy.setText(academy);

si.TFmajor.setText(major);

else

JOptionPane.showMessageDialog(null,"CheckTheIDAgain!");

con.close();

catch(Exceptione)

System.out.println("Error:"+e);

elseif(funjcb1.getSelectedItem().equals("selectbyname"))

try

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stmt=con.createStatement();

rs=stmt.executeQuery("select*fromstudentinforwheresname='"+funjtf1.getText()+"'");

Stringrows[]={"","","","","","","",""};

rsmd=rs.getMetaData();

if(rs.next())

intid=rs.getInt(1);

StringID=Integer.toString(id);

Stringname=rs.getString(2);

Stringgender=rs.getString(3);

Stringbirth=rs.getString(4);

Stringmobil=rs.getString(5);

Stringemail=rs.getString(6);

Stringacademy=rs.getString(7);

Stringmajor=rs.getString(8);

StudentInformationsi=newStudentInformation();

si.TFid.setText(ID);

si.TFname.setText(name);

si.TFsex.setText(gender);

si.TFbirthday.setText(birth);

si.TFmobil.setText(mobil);

si.TFemail.setText(email);

si.TFacademy.setText(academy);

si.TFmajor.setText(major);

else

JOptionPane.showMessageDialog(null,"CheckTheNameAgain!");

con.close();

funjtb.repaint();

funjtb.updateUI();

catch(Exceptione)

System.out.println("Error:"+e);

elseif(ae.getSource().equals(funjbcancel))

funjtf1.setText(null);

elseif(ae.getActionCommand()=="Add")

newAddInformation();

elseif(ae.getActionCommand()=="Delete")

try{

if(funjcb1.getSelectedItem().equals("selectbyID"))

if(funjtf1.getText().equals(""))

JOptionPane.showMessageDialog(null,"PleaseInputStudentID!");

else{

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stmt=con.createStatement();

rs=stmt.executeQuery("select*fromstudentinforwheresid="+Integer.parseInt(funjtf1.getText()));

if(rs.next())

con.close();

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stat=con.prepareStatement("deletefromstudentinforwheresid=?");

Strings1=funjtf1.getText();

intn=Integer.parseInt(s1);

stat.setInt(1,n);

stat.executeUpdate();

JOptionPane.showMessageDialog(null,"StudenthasbeenDeleted!");

con.close();

else

JOptionPane.showMessageDialog(null,"TheStufdentnotExist!");

elseif(funjcb1.getSelectedItem().equals("selectbyname"))

if(funjtf1.getText().equals(""))

JOptionPane.showMessageDialog(null,"PleaseInputStudentName!");

else{

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stmt=con.createStatement();

rs=stmt.executeQuery("select*fromstudentinforwheresname='"+funjtf1.getText()+"'");

if(rs.next())

con.close();

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stat=con.prepareStatement("deletefromstudentinforwheresname=?");

Strings1=funjtf1.getText();

stat.setString(1,s1);

stat.executeUpdate();

JOptionPane.showMessageDialog(null,"StudenthasbeenDeleted!");

con.close();

else

JOptionPane.showMessageDialog(null,"TheStufdentnotExist!");

}catch(Exceptione)

System.out.println("Error:"+e);

elseif(ae.getSource().equals(funjbupdate))

try

if(funjcb1.getSelectedItem().equals("selectbyID"))

if(funjtf1.getText().equals(""))

JOptionPane.showMessageDialog(null,"PleaseInputStudentID!");

else

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stmt=con.createStatement();

rs=stmt.executeQuery("select*fromstudentinforwheresid="+Integer.parseInt(funjtf1.getText()));

if(rs.next())

Stringsss=funjtf1.getText();

intsd=Integer.parseInt(sss);

UpdateInformationui=newUpdateInformation();

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stmt=con.createStatement();

rs=stmt.executeQuery("select*fromstudentinforwheresid="+sd);

rs.next();

Stringsr=rs.getString(1);

Stringsr1=rs.getString(2);

ui.TFid.setText(sr);

ui.TFname.setText(sr1);

con.close();

else

JOptionPane.showMessageDialog(null,"TheStufdentnotExist!");

if(funjcb1.getSelectedItem().equals("selectbyname"))

if(funjtf1.getText().equals(""))

JOptionPane.showMessageDialog(null,"PleaseInputStudentName!");

else

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stmt=con.createStatement();

rs=stmt.executeQuery("select*fromstudentinforwheresname='"+funjtf1.getText()+"'");

if(rs.next())

Stringss=funjtf1.getText();

UpdateInformationui=newUpdateInformation();

con=DriverManager.getConnection("jdbc:odbc:DataSource");

stmt=con.createStatement();

rs=stmt.executeQuery("select*fromstudentinforwheresname='"+ss+"'");

rs.next();

Stringsr=rs.getString(1);

Stringsr1=rs.getString(2);

ui.TFid.setText(sr);

ui.TFname.setText(sr1);

con.close();

else

JOptionPane.showMessageDialog(null,"TheStufdentnotExist!");

catch(Exceptione)

System.out.println("Error:"+e);

//AddUserGUI

//AddUser.java

packagestudentinformationmanagementsystem;

importjava.awt.*;

importjava.sql.*;

importjavax.swing.*;

importjava.awt.event.*;

publicclassAddUserextendsJFrameimplementsActionListener{

JLabellname,lpassword,lrealname,lmobil;

JTextFieldfname,frealname,fmobil;

JButtonok,quit;

JPasswordFieldfpassword;

Connectioncon;

PreparedStatementstat;

Statementstmt;

ResultSetrs;

AddUser()

super("AddUserInformation");

this.setLayout(null);

lname=newJLabel("Name");

lname.setBounds(20,20,50,25);

fname=newJTextField();

fname.setEditable(true);

fname.setBounds(90,20,120,25);

lpassword=newJLabel("Password");

lpassword.setBounds(20,55,50,25);

fpassword=newJPasswordField();

fpassword.setEchoChar('*');

fpassword.setEditable(true);

fpassword.setBounds(90,55,120,25);

lrealname=newJLabel("RealName");

lrealname.setBounds(20,90,50,25);

frealname=newJTextField();

frealname.setEditable(true);

frealname.setBounds(90,90,120,25);

lmobil=newJLabel("Mobil");

lmobil.setBounds(20,125,50,25);

fmobil=newJTextField();

fmobil.setEditable(true);

fmobil.setBounds(90,125,120,25);

ok=newJButton("OK");

ok.setBounds(40,180,50,25);

quit=newJButton("Quit");

quit.setBounds(120,180,60,25);

this.add(lname);

this.add(fname);

this.add(lpassword);

this.add(fpassword);

this.add(lrealname);

this.add(frealname);

this.add(lmobil);

this.add(fmobil);

this.add(ok);

this.add(quit);

ok.addActionListener(this);

quit.addActionListener(this);

this.setVisible(true);

DimensionscreenSize=Toolkit.getDefaultToolkit().getScreenSize();

setBounds((screenSize.width-350)/2,(screenSize.height-450)/2,260,280);

publicvoidactionPerformed(ActionEventae)

if(ae.getActionCommand()=="Quit")

this.dispose();

if(ae.getActionCommand()=="OK")

Stringname=fname.getText();

Stringpassword=fpassword.getText();

Stringrealname=frealname.getText();

Stringmobil=fmobil.getText();

if(name.equals("")||password.equals("")||realname.equals("")||mobil.equals(""))

JOptionPane.showMessageDialog(null,"PleaseInputAllInformation!");

else{

if((password.length()==6)&&(fmobil.getText().length()==11))

try{

con=DriverManager.getConnection("jdbc:odbc:DataSource","","");

stat=con.prepareStatement("insertintouseinfovalues(?,?,?,?)");

stat.setString(1,name);

stat.setString(2,password);

stat.setString(3,realname);

stat.setString(4,mobil);

stat.executeUpdate();

JOptionPane.showMessageDialog(null,"UserInformationhasbeenInserted!");

fname.setText("");

fpassword.setText("");

frealname.setText("");

fmobil.setText("");

con.close();

stmt.close();

rs.close();

}catch(Exceptione)

System.out.println("Error:"+e);

else

JOptionPa

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论