圖書管理系統(tǒng)java代碼_第1頁(yè)
圖書管理系統(tǒng)java代碼_第2頁(yè)
圖書管理系統(tǒng)java代碼_第3頁(yè)
圖書管理系統(tǒng)java代碼_第4頁(yè)
圖書管理系統(tǒng)java代碼_第5頁(yè)
已閱讀5頁(yè),還剩49頁(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)介

1、登錄/注冊(cè)(RLogin,userbean)退出f增加圖書圖書借閱(bookAdd, bookbean)(bookLend,修改圖書信bookbean)(bookEdit,圖書歸還bookbean)刪除圖書(bookReturn,(bookDel,bookbean)bookbean)圖書查詢添加成員(memberAdd,(booksearch,memberBean)bookbean)刪除成)(memberDelete, I memberBean息員7“修改個(gè)人信息(personinfo, personBean) 查看我借的書(mybook, lookMybook)L J可編輯組員分工:劉會(huì)敏:

2、圖書管理(增,刪,查詢,修改圖書信息)方法及部分頁(yè)面,鏈接數(shù)據(jù)庫(kù)(DatabaseConn2)寧俊明:主界面(bookMain),登錄注冊(cè)界面面板(RLogin),修改個(gè)人信息,添加、刪除成員方法王盛開:登錄注冊(cè)方法(userbean),查看我借的書頁(yè)面,添加刪除成員頁(yè)面,添加刪除圖書頁(yè)面項(xiàng)目下的包及類:vULibrary£y?terh*&5行v史bookDE> 5bookAddjava田bcokBean.javs.J_bookOel.jawa.Jbo口kEdHjavajj|bcokLendjava> .bcokMainjava.J_,bookReturnjava

3、ijbcokSrchJavaJ|DatahaeCDnn2.javaff|IookMybookJava> 值tn&mberAddjavaJmemberBeanjavaJ,member&eIeteJava> .7Mybookjava> R)Beanjavafjper?onlnfc.java.JRLogir.javauserbeanjava數(shù)據(jù)庫(kù)bookcollection表book(bookID設(shè)置為自增)表user表userbook可編輯可編輯主頁(yè)面:圖書中心管理圖書及成員個(gè)人中心7添加成員4增加圖書5刪除圖書10.我所借的書9.修改個(gè)人資料6修改圖書信息8刪除

4、成員只向管理員顯示,判斷用戶是否為管理員Ssession)1,2,3,4,5,6對(duì)book表進(jìn)行操作;9對(duì)user表進(jìn)行操作;10對(duì)userbook表進(jìn)行操作;效果均為點(diǎn)擊后出現(xiàn)新的頁(yè)面登錄/注冊(cè):(注冊(cè)后直接登錄,跳轉(zhuǎn)到主頁(yè)面)登錄注冊(cè):姓名廠設(shè)置變量::驗(yàn)證用戶名,密碼(fromuser)密碼學(xué)號(hào)username,sex,password,userID,userType,department,major我是:5科生0研究生0教師所在院系注冊(cè)登錄注冊(cè)頁(yè)面:可編輯packagebookDB;importjava.awt.*;importjava.awt.event.ActionEvent;im

5、portjava.awt.event.ActionListener;importjavax.swing.*;publicclassRLoginextendsJFrameimplementsActionListener/Containerc;Stringsex;inttype;/創(chuàng)建登錄組件JLabeljlabel0=newJLabel("登錄:");JLabeljLabel1=newJLabel("學(xué)號(hào)(或職工號(hào)):");JLabeljLabel2=newJLabel("密碼:");/ 創(chuàng)建登錄確定按鈕注冊(cè): ");姓名:&

6、quot;);性別:");密碼:");學(xué)號(hào)(或職工號(hào)): ");院系:");專業(yè):");用戶類別: ");JTextFielduserID1=newJTextField(10);JTextFieldpassword1=newJTextField(10);JButtonbtn_ok1=newJButton();/創(chuàng)建注冊(cè)組件JLabeljlabel00=newJLabel("JLabeljLabel3=newJLabel("JLabeljLabel4=newJLabel("JLabeljLabel5=new

7、JLabel("JLabeljLabel6=newJLabel("JLabeljLabel7=newJLabel("JLabeljLabel8=newJLabel("JLabeljLabel9=newJLabel("JTextFieldname=newJTextField(10);JTextFieldpassword2=newJTextField(10);JTextFieldID2=newJTextField(10);JTextFielddepartment=newJTextField(10);JTextFieldmajor=newJTextF

8、ield(10);JRadioButtonrb1;/單選按鈕,用于設(shè)定性別JRadioButtonrb2;/用戶類型選擇JButtonbtn_ok2=newJButton();/創(chuàng)建注冊(cè)確定按鈕/構(gòu)造函數(shù)publicRLogin()super("登錄/注冊(cè):");/調(diào)用JFrame的構(gòu)造函數(shù)Stringsex="男","女"Stringtype="本科生","研究生","老師"JPanelpanel1=newJPanel(newFlowLayout();/使用JPanel類創(chuàng)

9、建面板,該類是JComponent類的子類,后者又?jǐn)U展Container/每個(gè)JPanel都是一個(gè)Container,因此,可以向JPanel添加包括面板在內(nèi)的組件/this.setBackground(Color.YELLOW);this.add(panel1);this.add(panel1,BorderLayout.NORTH);/JFrame類的默認(rèn)布局管理器為BorderLayout,此處將panel1設(shè)置在面板的北側(cè)。/在panel1面板上添加標(biāo)簽panel1.add(jlabel0);panel1.add(jLabel1);panel1.add(userID1);panel1.a

10、dd(jLabel2);panel1.add(password1);btn_ok1=newJButton("確定");btn_ok1.addActionListener(this);panel1.add(btn_ok1);JPanelpanel2=newJPanel(newFlowLayout();this.add(panel2);this.add(panel2,BorderLayout.CENTER);/JFrame類的默認(rèn)布局管理器為BorderLayout,此處將panel2設(shè)置在面板的南側(cè)。/在panel2面板上添加組件panel2.add(jlabel00);pa

11、nel2.add(jLabel3);panel2.add(name);panel2.add(jLabel4);/創(chuàng)建ButtonGroup的對(duì)象,用于維護(hù)單選按鈕的邏輯關(guān)系ButtonGroupbg1=newButtonGroup();rb1=newJRadioButtonsex.length;/單選按鈕for(inti=0;i<2;i+)/rb1i=newJRadioButton(sexi);bg1.add(rb1i);/管理單選按鈕panel2.add(rb1i);/將單選按鈕添加到面panel2.add(jLabel5);panel2.add(password2);panel2.a

12、dd(jLabel6);panel2.add(ID2);panel2.add(jLabel7);panel2.add(department);panel2.add(jLabel8);panel2.add(major);panel2.add(jLabel9);/創(chuàng)建ButtonGroup的對(duì)象,用于維護(hù)單選按鈕的邏輯關(guān)系ButtonGroupbg2=newButtonGroup();單選按鈕j);rb2=newJRadioButtontype.length;/for(intj=0;j<3;j+)/rb2j=newJRadioButton(typebg2.add(rb2j);/ 管理單選按鈕

13、,只能選一個(gè)panel2.add(rb2j);/ 將單選按鈕添加到面btn_ok2 = new JButton("確定 ");btn_ok2.addActionListener(this);panel2.add(btn_ok2);publicstaticvoidmain(Stringargs)RLoginapp=newRLogin();app.setSize(600,200);/設(shè)置窗口大小app.setVisible(true);/設(shè)置窗口可見app.setDefaultCloseOperation(EXIT_ON_CLOSE);/endmainmethodOverrid

14、epublicvoidactionPerformed(ActionEvente)/TODOAuto-generatedmethodstub/Stringsex,type;/用戶點(diǎn)擊登錄確定按鈕if(e.getSource()=btn_ok1)userbeanrs=newuserbean();/System.out.println(userID1.getText()+password1.getText();rs.login(userID1.getText(),password1.getText();this.dispose();/用戶點(diǎn)擊注冊(cè)確定按鈕if(e.getSource()=btn_ok

15、2)/獲取用戶選擇的性別并存入sex中for(intm=0;m<rb1.length;m+)if(rb1m.isSelected()sex=rb1m.getText();/獲取用戶選擇的類別并存入type中for(intn=0;n<rb2.length;n+)if(rb2n.isSelected()type=n+1;userbeanrs=newuserbean();ID2.getText(),rs.register(name.getText(),sex,password2.getText(),department.getText(),major.getText(),type);th

16、is.dispose();/endactionPrformmethod/endsystemLoginmethod登錄注冊(cè)方法:packagebookDB;importjava.sql.ResultSet;importjava.sql.SQLException;importjavax.swing.JOptionPane;publicclassuserbeanfalsebooleanboolLogin=false;/用戶登錄之后為true,沒登錄狀態(tài)下為Stringsql;StringuserID;staticStringloginID;/定義登錄后的IDstaticintusertype;Str

17、ingusername;Stringpassword;Stringsex;Stringdepartment;Stringmajor;intuserType;intcanBorrow;ResultSetrs=null;/*注冊(cè) *public void register(String username,Stringsex,Stringpassword,StringuserID,Stringdepartment,Stringmajor,inttype)DatabaseConn2DB=newDatabaseConn2();this.username=username;this.userID=user

18、ID;this.sex=sex;this.department=department;this.major=major;/添加圖書時(shí),剩余館藏量=館藏量if(username.equals("")|userID.equals("")|sex.equals("")|department.equals("")|major.equals("")/提示完善圖書信息請(qǐng) 完 善 信 息 "," 錯(cuò) 誤轉(zhuǎn)換用戶類型為 int 型JOptionPane.showMessageDialog(n

19、ull,",JOptionPane.ERROR_MESSAGE);return;else/inttype=Integer.parseInt(userType);/sql"insertintouser(userName,sex,password,userID,department,major,userType)"+values('"+username+"','"+sex+"','"+password+"','"+userID+"&#

20、39;,'"+department+"','" +major+"',"+type+")"tryDB.executeUpdate(sql); / 更新語(yǔ)句JOptionPane.showMessageDialog(null," 注冊(cè)成功!您可返回登錄 "); / 提示添加成功/ bookMain main =new bookMain();RLogin login = new RLogin();login.pack();login.setVisible(true);catch

21、(Exception e)System.out.println(e);JOptionPane.showMessageDialog(null," 保 存 失 敗 !"," 錯(cuò) 誤 ",JOptionPane.ERROR_MESSAGE);finally DB.close();/*登錄 *publicvoidlogin(StringuserId,Stringpassword1)DatabaseConn2DB=newDatabaseConn2();this.userID=userId;this.password=password1;if(userID.equa

22、ls("")|password.equals("")請(qǐng)?zhí)顚?完 整登錄 信息 !"," 錯(cuò) 誤JOptionPane.showMessageDialog(null,"",JOptionPane.ERROR_MESSAGE);return;elsesql="select*fromuserwhereuserID='"+userID+"'"rs=DB.executeQuery(sql);tryif(rs.next()System.out.println(rs.get

23、String("password");if(rs.getString("password").equals(password)JOptionPane.showMessageDialog(null,"登錄成功!");bookMainmain=newbookMain();/登錄成功后顯示登錄頁(yè)main.pack();main.setVisible(true);/HttpSessionsession=request.getSession(true);/session.removeAttribute(logid);/session.setAt

24、tribute(logid,userID);loginID=userID;/獲取登錄后的用戶ID/獲取用戶類型usertype=Integer.parseInt(rs.getString("userType");System.out.println(usertype+"t"+rs.getString("userType");elseSystem.out.println("你好");catch(SQLExceptione)/TODOAuto-generatedcatchblocke.printStackTrace()

25、;主頁(yè)面:.國(guó)圖書管理浜統(tǒng)-X己系統(tǒng)操作因書中心管理四書及成員個(gè)人信息苣理packagebookDB;importjava.awt.*;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjavax.swing.*;可編輯publicclassRLoginextendsJFrameimplementsActionListener/Containerc;Stringsex;inttype;/創(chuàng)建登錄組件JLabeljlabel0=newJLabel("登錄:");JLabeljL

26、abel1=newJLabel("學(xué)號(hào)(或職工號(hào)):");JLabeljLabel2=newJLabel("密碼:");JTextFielduserID1=newJTextField(10);JTextFieldpassword1=newJTextField(10);JButtonbtn_ok1=newJButton();/創(chuàng)建注冊(cè)組件JLabeljlabel00=newJLabel("JLabeljLabel3=newJLabel("JLabeljLabel4=newJLabel("JLabeljLabel5=newJLa

27、bel("JLabeljLabel6=newJLabel("JLabeljLabel7=newJLabel("JLabeljLabel8=newJLabel("JLabeljLabel9=newJLabel("/創(chuàng)建登錄確定按鈕注冊(cè):");姓名:");性別:");密碼:");學(xué)號(hào)(或職工號(hào)):");院系:");專業(yè):");用戶類別:");JTextFieldname=newJTextField(10);JTextFieldpassword2=newJTextFiel

28、d(10);JTextFieldID2=newJTextField(10);JTextFielddepartment=newJTextField(10);JTextFieldmajor=newJTextField(10);JRadioButtonrb1;/單選按鈕,用于設(shè)定性別JRadioButtonrb2;/用戶類型選擇JButtonbtn_ok2=newJButton();/創(chuàng)建注冊(cè)確定按鈕/構(gòu)造函數(shù)publicRLogin()super("登錄/注冊(cè):");/調(diào)用JFrame的構(gòu)造函數(shù)Stringsex="男","女"Strin

29、gtype="本科生","研究生","老師"JPanelpanel1=newJPanel(newFlowLayout();/使用JPanel類創(chuàng)建面板,該類是JComponent類的子類,后者又?jǐn)U展Container/每個(gè)JPanel都是一個(gè)Container,因此,可以向JPanel添加包括面板在內(nèi)的組件/this.setBackground(Color.YELLOW);this.add(panel1);/ JFrame 類的默認(rèn)布局管理器為this.add(panel1,BorderLayout.NORTH);BorderLayo

30、ut,此處將panel1設(shè)置在面板的北側(cè)。/在panel1面板上添加標(biāo)簽panel1.add(jlabel0);panel1.add(jLabel1);panel1.add(userID1);panel1.add(jLabel2);panel1.add(password1);btn_ok1=newJButton("確定");btn_ok1.addActionListener(this);panel1.add(btn_ok1);JPanelpanel2=newJPanel(newFlowLayout();this.add(panel2);this.add(panel2,Bor

31、derLayout.CENTER);/JFrame類的默認(rèn)布局管理器為BorderLayout,此處將panel2設(shè)置在面板的南側(cè)。/在panel2面板上添加組件panel2.add(jlabel00);panel2.add(jLabel3);panel2.add(name);panel2.add(jLabel4);/創(chuàng)建ButtonGroup的對(duì)象,用于維護(hù)單選按鈕的邏輯關(guān)系ButtonGroupbg1=newButtonGroup();rb1=newJRadioButtonsex.length;/單選按鈕for(inti=0;i<2;i+)/rb1i=newJRadioButton(

32、sexi);bg1.add(rb1i);/管理單選按鈕panel2.add(rb1i);/將單選按鈕添加到面panel2.add(jLabel5);panel2.add(password2);panel2.add(jLabel6);panel2.add(ID2);panel2.add(jLabel7);panel2.add(department);panel2.add(jLabel8);panel2.add(major);panel2.add(jLabel9);/創(chuàng)建ButtonGroup的對(duì)象,用于維護(hù)單選按鈕的邏輯關(guān)系ButtonGroupbg2=newButtonGroup();單選按鈕

33、rb2=newJRadioButtontype.length;/for(intj=0;j<3;j+)/j);rb2j=newJRadioButton(typebg2.add(rb2j);/ 管理單選按鈕,只能選一個(gè)panel2.add(rb2j); / 將單選按鈕添加到面btn_ok2 = new JButton(" 確定 ");btn_ok2.addActionListener(this);panel2.add(btn_ok2);public static void main(String args) RLogin app = new RLogin();app.se

34、tSize(600, 200); / 設(shè)置窗口大小app.setVisible(true); / 設(shè)置窗口可見app.setDefaultCloseOperation(EXIT_ON_CLOSE); / end main methodOverridepublic void actionPerformed(ActionEvent e) / TODO Auto-generated method stub/String sex, type;/ 用戶點(diǎn)擊登錄確定按鈕if(e.getSource()=btn_ok1)userbeanrs=newuserbean();/System.out.println

35、(userID1.getText()+password1.getText();rs.login(userID1.getText(),password1.getText();this.dispose();/用戶點(diǎn)擊注冊(cè)確定按鈕if(e.getSource()=btn_ok2)/獲取用戶選擇的性別并存入sex中for(intm=0;m<rb1.length;m+)if(rb1m.isSelected()sex=rb1m.getText();/獲取用戶選擇的類別并存入type中for(intn=0;n<rb2.length;n+)if(rb2n.isSelected()type=n+1;

36、userbeanrs=newuserbean();rs.register(name.getText(),sex,password2.getText(),ID2.getText(),department.getText(),major.getText(),type);this.dispose();/endactionPrformmethod/endsystemLoginmethod添加圖書:03-Kfc|brghgh狗量gI作者加x出的社卜】大出斯杜砌版.nkLi.XX4-tirsII4口irqd»packagebookDB;importjava.awt.*;importjava.aw

37、t.event.*;importjavax.swing.*;publicclassbookAddextendsJFrameimplementsActionListener監(jiān)聽機(jī)制Containerc;JLabeljLabel1=newJLabel("圖書名");/JLable存放文本或圖像JLabeljLabel2=newJLabel("數(shù)量");JLabeljLabel3=newJLabel("作者");JLabeljLabel4=newJLabel("出版社");JTextFieldbookname=newJT

38、extField(10);/JTextField獲取圖書名JTextFieldnumber=newJTextField(10);JTextFieldauthor=newJTextField(10);JTextFieldpress=newJTextField(10);JButtonaddconfirm=newJButton();/JButton按鈕publicbookAdd()this.setTitle("增加圖書信息");this.setResizable(true);/setResizable(true)窗口大小可調(diào)節(jié),false不可調(diào)節(jié)tryInit();catch(E

39、xceptione)/獲取異常e.printStackTrace();publicvoidInit()throwsException/初始化函數(shù)this.setSize(300,500);/設(shè)置大小c=this.getContentPane();/獲取內(nèi)容面板,所有顯示在窗口的控件都添加在這個(gè)面板上c.setLayout(newFlowLayout();/布局管理器setLayout()c.add(jLabel1);/向面板添加文字“圖書ID:”c.add(bookname);/向面板添加圖書名輸入框c.add(jLabel2);/添加圖書數(shù)量c.add(number);/向面板添加圖書數(shù)量輸

40、入框c.add(jLabel3);/添加作者c.add(author);/添加作者輸入框c.add(jLabel4);/添加出版社c.add(press);/添加出版社輸入框addconfirm.setText("確認(rèn)增加");/設(shè)置按鈕上的字addconfirm.setFont(newFont("Dialog",0,12);/設(shè)置按鈕上字體c.add(addconfirm);/添加按鈕addconfirm.addActionListener(this);/對(duì)按鈕添加事件監(jiān)聽publicvoidactionPerformed(ActionEvente)O

41、bjectobj=e.getSource();/獲得事件監(jiān)聽對(duì)象if(obj=addconfirm)bookBeanrs=newbookBean();intnumInteger.parseInt(number.getText();將獲取的圖書數(shù)量由String類型轉(zhuǎn)化為整型rs.bookAdd(bookname.getText(),num,author.getText(),press.getText();this.dispose();關(guān)閉窗口,并釋放窗體資源packagebookDB;修改圖書信息:importjava.awt.*;importjava.awt.event.*;importja

42、vax.swing.*;publicclassbookEditextendsJFrameimplementsActionListenerContainerc;JLabeljLabel1=newJLabel("圖書ID:");JLabeljLabel2=newJLabel("圖書名:");JLabeljLabel3=newJLabel("作者:");JLabeljLabel4=newJLabel("出版社:");JLabeljLabel5=newJLabel("館藏量:");JLabeljLabe

43、l6=newJLabel("剩余館藏量:");JLabeljLabel7=newJLabel("當(dāng)前預(yù)約人數(shù):");JTextFieldbookID=newJTextField(10);JTextFieldbookname=newJTextField(10);JTextFieldauthor=newJTextField(10);JTextFieldpress=newJTextField(10);JTextFieldnumber=newJTextField(10);JTextFieldlastNumber=newJTextField(10);JTextFi

44、eldapointment=newJTextField(10);JButtoneditconfirm=newJButton();publicbookEdit()this.setTitle("修改圖書信息");this.setResizable(true);tryInit();catch(Exceptione)e.printStackTrace();/設(shè)置居中DimensionscreenSize=Toolkit.getDefaultToolkit().getScreenSize();this.setLocation(int)(screenSize.width-400)/2,

45、(int)(screenSize.height300)/2+45);publicvoidInit()throwsExceptionthis.setSize(600,500);c=this.getContentPane();c.setLayout(newFlowLayout();c.add(jLabel1);bookID.setText(null);c.add(bookID);c.add(jLabel2);bookname.setText(null);c.add(bookname);c.add(jLabel3);author.setText(null);c.add(author);c.add(j

46、Label4);press.setText(null);c.add(press);c.add(jLabel5);number.setText(null);c.add(number);c.add(jLabel6);lastNumber.setText(null);c.add(lastNumber);c.add(jLabel7);apointment.setText(null);c.add(apointment);/更改信息的組件添加完畢editconfirm.setText("確認(rèn)修改");c.add(editconfirm);editconfirm.addActionLis

47、tener(this);/添加事件監(jiān)聽publicvoidactionPerformed(ActionEvente)Objectobj=e.getSource();if(obj=editconfirm)bookBeanrs=newbookBean();rs.bookModify(bookID.getText(),bookname.getText(),author.getText(),press.getText(),number.getText(),lastNumber.getText(),apointment.getText();this.dispose();借閱圖書:packagebookD

48、B;importjava.awt.*;importjava.awt.event.*;importjavax.swing.*;publicclassbookLendextendsJFrameimplementsActionListenerContainerc;JLabeljLabel1=newJLabel();JLabeljLabel2=newJLabel();JLabeljLabel3=newJLabel();JLabeljLabel4=newJLabel();JTextFieldbookname=newJTextField(10);JTextFieldbookID=newJTextField

49、(10);JTextFieldusername=newJTextField(10);JTextFielduserID=newJTextField(10);JButtonbookconfirm=newJButton();publicbookLend()this.setTitle("借閱圖書");this.setResizable(true);tryInit();catch(Exceptione)e.printStackTrace();/設(shè)置居中DimensionscreenSize=Toolkit.getDefaultToolkit().getScreenSize();thi

50、s.setLocation(int)(screenSize.width-400)/2,(int)(screenSize.height300)/2+45);publicvoidInit()throwsExceptionthis.setSize(600,500);c=this.getContentPane();c.setLayout(newFlowLayout();jLabel1.setText("借閱圖書名:");c.add(jLabel1);bookname.setText(null);c.add(bookname);可編輯jLabel2.setText("借閱圖

51、書ID:");c.add(jLabel2);bookID.setText(null);c.add(bookID);bookconfirm.setText("確定");/設(shè)置按鈕c.add(bookconfirm);/添加按鈕控件bookconfirm.addActionListener(this);/添加監(jiān)聽事件publicvoidactionPerformed(ActionEvente)Objectobj=e.getSource();if(obj=bookconfirm)bookBeanrs=newbookBean();intbookid=Integer.par

52、seInt(bookID.getText();/獲取登錄用戶的iduserbeanlogin=newuserbean();StringloginID=login.loginID;/System.out.println(loginID);rs.bookBook(bookname.getText(),bookid,loginID);this.dispose();還書:1國(guó)后還圖書一口乂歸通圖Mid:(3醯定1確定packagebookDB;importjava.awt.*;importjava.awt.event.*;importjavax.swing.*;publicclassbookRetur

53、nextendsJFrameimplementsActionListenerContainerc;/JLabeljLabel1=newJLabel();/歸還圖書的名稱/JTextFieldbookname=newJTextField(10);JLabeljLabel2=newJLabel();歸還圖書的idJTextFieldbookid=newJTextField(10);JButtonreconfirm=newJButton();publicbookReturn()this.setTitle("歸還圖書");this.setResizable(true);tryIni

54、t();catch(Exceptione)e.printStackTrace();/設(shè)置居中DimensionscreenSize=Toolkit.getDefaultToolkit().getScreenSize();this.setLocation(int)(screenSize.width-400)/2,(int)(screenSize.height300)/2+45);publicvoidInit()throwsExceptionthis.setSize(300,500);c=this.getContentPane();c.setLayout(newFlowLayout();jLabe

55、l2.setText("歸還圖書id:");c.add(jLabel2);bookid.setText(null);c.add(bookid);reconfirm.setText("確定");c.add(reconfirm);reconfirm.addActionListener(this);publicvoidactionPerformed(ActionEvente)Objectobj=e.getSource();if(obj=reconfirm)bookBeanrs=newbookBean();/intbookId=Integer.parseInt(bookid.getText();rs.bookReturn(bookid.getText();/this.dispos

溫馨提示

  • 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ù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 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)論