ImageVerifierCode 换一换
格式:DOC , 页数:84 ,大小:329.04KB ,
资源ID:3173130      下载积分:18 金币
验证码下载
登录下载
邮箱/手机:
验证码: 获取验证码
温馨提示:
支付成功后,系统会自动生成账号(用户名为邮箱或者手机号,密码是验证码),方便下次登录下载和查询订单;
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/3173130.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  
声明  |  会员权益     获赠5币     写作写作

1、填表:    下载求助     留言反馈    退款申请
2、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
3、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
4、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
5、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前自行私信或留言给上传者【精***】。
6、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
7、本文档遇到问题,请及时私信或留言给本站上传会员【精***】,需本站解决可联系【 微信客服】、【 QQ客服】,若有其他问题请点击或扫码反馈【 服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【 版权申诉】”(推荐),意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:4008-655-100;投诉/维权电话:4009-655-100。

注意事项

本文(JAVA课程设计基于UI的图书管理系统.doc)为本站上传会员【精***】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4008-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

JAVA课程设计基于UI的图书管理系统.doc

1、JAVA课程设计汇报(图书管理系统)1. 系统目旳与功能(1)本系统通链接ACCESS完毕对顾客信息和图书信息旳管理,并制作可视化界面进行操作。(2)系统重要实现旳功能有顾客旳登陆,图书旳插入、修改、删除、查看、借阅、偿还。2. 开发工具开发工具使用Eclipse作为主用开发环境,并使用VE有关制作系统界面部分。3. 系统阐明(如下名字都是类名)1. Access类来进行界面切换,数据库操作等。2. MainMenu、Regsdit类是系统登陆界面和顾客注册界面。3. MainCl类是系统旳重要界面。4. Insert、Look、Update、Delete、Sendbook、Backbook类

2、分别用来进行图书插入、图书信息查看、图书信息修改、图书删除、借阅图书、偿还图书。5. 程序代码Access类package access;import java.sql.*;import javax.swing.JLabel;import javax.swing.JPanel;import javax.swing.JTextField;import view.*;public class Access Connection conn = null;Statement stmt = null;ResultSet rs = null;PreparedStatement ps = null;Stri

3、ng username; String temp;String password;String bookname;String bookid;String author;String publisher;String name;int count;JTextField test;JTextField test1;JLabel jLabel;JPanel jpane;int result=0;public Access(String username, String password) this.username = username;this.password = password;try C

4、lass.forName(sun.jdbc.odbc.JdbcOdbcDriver);String strurl = jdbc:odbc:driver=Microsoft Access Driver (*.mdb);DBQ=D:workspacebookmis.mdb;conn = DriverManager.getConnection(strurl);stmt = conn.createStatement(); catch (Exception e) public Access(String bookname,String bookid,String author,String publis

5、her,JTextField test) this.bookname=bookname;this.bookid=bookid;this.author=author;this.publisher=publisher;this.test=test;try Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);String strurl = jdbc:odbc:driver=Microsoft Access Driver (*.mdb);DBQ=D:workspacebookmis.mdb;conn = DriverManager.getConnection(str

6、url);stmt = conn.createStatement(); catch (Exception e) public Access(String bookname,String bookid,String author,String publisher,JLabel jlabel) this.bookname=bookname;this.bookid=bookid;this.author=author;this.publisher=publisher;this.jLabel=jlabel;try Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);S

7、tring strurl = jdbc:odbc:driver=Microsoft Access Driver (*.mdb);DBQ=D:workspacebookmis.mdb;conn = DriverManager.getConnection(strurl);stmt = conn.createStatement(); catch (Exception e) public Access() try Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);String strurl = jdbc:odbc:driver=Microsoft Access D

8、river (*.mdb);DBQ=D:workspacebookmis.mdb;conn = DriverManager.getConnection(strurl);stmt = conn.createStatement(); catch (Exception e) public Access(String temp,JTextField test1) this.temp=temp;this.test1=test1;try Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);String strurl = jdbc:odbc:driver=Microsof

9、t Access Driver (*.mdb);DBQ=D:workspacebookmis.mdb;conn = DriverManager.getConnection(strurl);stmt = conn.createStatement(); catch (Exception e) public Access(String aname,JPanel jpane,JLabel jLabel) name=aname;this.jpane=jpane;this.jLabel=jLabel;try Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);Strin

10、g strurl = jdbc:odbc:driver=Microsoft Access Driver (*.mdb);DBQ=D:workspacebookmis.mdb;conn = DriverManager.getConnection(strurl);stmt = conn.createStatement(); catch (Exception e) public Access(String aname,JLabel jLabel) name=aname;this.jLabel=jLabel;try Class.forName(sun.jdbc.odbc.JdbcOdbcDriver)

11、;String strurl = jdbc:odbc:driver=Microsoft Access Driver (*.mdb);DBQ=D:workspacebookmis.mdb;conn = DriverManager.getConnection(strurl);stmt = conn.createStatement(); catch (Exception e) public void regsdit() try result=stmt.executeUpdate(insert into userinform(username,password) values(+username+,+

12、password+); catch (SQLException e) / TODO 自动生成 catch 块new Fail().getJDialog();if (result = 1) MainMenu mainmenu = new MainMenu();mainmenu.getJFrame(); else public void login() try rs=stmt.executeQuery(select * from userinform where username=+username+ and password=+password+);if(rs.next()MainCl main

13、cl =new MainCl();maincl.getJFrame();else LoginFail loginfail=new LoginFail();loginfail.getJDialog(); catch (SQLException e) / TODO 自动生成 catch 块e.printStackTrace();public void insert() try result=stmt.executeUpdate(insert into bookmis(bookname,num,auther,publisher) values(+bookname+,+bookid+,+author+

14、,+publisher+); catch (SQLException e) / TODO 自动生成 catch 块e.printStackTrace();if(result=1)test.setText(插入成功);else test.setText(插入失败);public void look() Look alook =new Look();tryrs = stmt.executeQuery(select * from bookmis);while (rs.next() bookname=rs.getString(bookname);bookid=rs.getString(num);aut

15、hor=rs.getString(auther);publisher=rs.getString(publisher);count=rs.getInt(count);String acount=Integer.toString(count);String temp=书名: +bookname+ 编号: +bookid+ 作者: +author+ 出版社: +publisher+ 数量:+acount;alook.getList().add(temp);alook.getJFrame();alook.getList().add(nnnn);catch(Exception e)public void

16、 delete() tryresult=0;result=stmt.executeUpdate(delete from bookmis where bookname=+temp+);catch(Exception e)if(result=1)test1.setText(删除成功);else test1.setText(删除失败,你输入旳书名有误);public void update() try rs = stmt.executeQuery(select * from bookmis where bookname=+name+);if(rs.next()stmt.executeUpdate(d

17、elete from bookmis where bookname=+name+);jpane.setVisible(true);elsejLabel.setText(请输入对旳旳书名); catch (SQLException e) public void aupdate() try result=stmt.executeUpdate(insert into bookmis(bookname,num,auther,publisher) values(+bookname+,+bookid+,+author+,+publisher+); catch (SQLException e) / TODO

18、 自动生成 catch 块e.printStackTrace();if(result=1)jLabel.setText(修改成功);else jLabel.setText(修改失败);public void sendbook() try rs = stmt.executeQuery(select * from bookmis where bookname=+name+);if(rs.next()int bcount=rs.getInt(count);if(bcount=0)jLabel.setText(书已经所有借完);return;stmt.executeUpdate(update book

19、mis set count=count-1 where bookname=+name+);jLabel.setText(借阅成功);elsejLabel.setText(没有这本书); catch (SQLException e) e.printStackTrace();public void backbook() try stmt.executeUpdate(update bookmis set count=count+1 where bookname=+name+);jLabel.setText(还书成功); catch (SQLException e) MainMenu类package

20、view;import javax.swing.JFrame;import javax.swing.JPanel;import java.awt.Dimension;import javax.swing.JLabel;import java.awt.Rectangle;import javax.swing.JTextField;import javax.swing.JButton;import access.Access;import javax.swing.JPasswordField;public class MainMenu private JFrame jFrame = null; /

21、 jve:decl-index=0:visual-constraint=159,78private JPanel jContentPane = null;private JLabel jLabel = null;private JTextField jTextField = null;private JLabel jLabel1 = null;private JButton jButton = null;private JButton jButton1 = null;private JPasswordField jPasswordField = null;/* * This method in

22、itializes jFrame * * return */public JFrame getJFrame() if (jFrame = null) jFrame = new JFrame();jFrame.setSize(new Dimension(461, 320);jFrame.setTitle(图书管理系统登陆界面);jFrame.setContentPane(getJContentPane();jFrame.setVisible(true);return jFrame;/* * This method initializes jContentPane * * return */pri

23、vate JPanel getJContentPane() if (jContentPane = null) jLabel1 = new JLabel();jLabel1.setBounds(new Rectangle(30, 121, 167, 30);jLabel1.setText( 密 码);jLabel = new JLabel();jLabel.setBounds(new Rectangle(30, 45, 167, 31);jLabel.setText( 顾客名);jContentPane = new JPanel();jContentPane.setLayout(null);jC

24、ontentPane.add(jLabel, null);jContentPane.add(getJTextField(), null);jContentPane.add(jLabel1, null);jContentPane.add(getJButton(), null);jContentPane.add(getJButton1(), null);jContentPane.add(getJPasswordField(), null);return jContentPane;/* * This method initializes jTextField * * return */private

25、 JTextField getJTextField() if (jTextField = null) jTextField = new JTextField();jTextField.setBounds(new Rectangle(211, 44, 223, 35);return jTextField;/* * This method initializes jButton * * return */private JButton getJButton() if (jButton = null) jButton = new JButton();jButton.setBounds(new Rec

26、tangle(61, 211, 121, 32);jButton.setText(登陆);jButton.addActionListener(new java.awt.event.ActionListener() public void actionPerformed(java.awt.event.ActionEvent e) String username=jTextField.getText();String password=jPasswordField.getText();Access access=new Access(username,password);access.login(

27、);jFrame.setVisible(false););return jButton;/* * This method initializes jButton1 * * return */private JButton getJButton1() if (jButton1 = null) jButton1 = new JButton();jButton1.setBounds(new Rectangle(269, 210, 139, 32);jButton1.setText(注册);jButton1.addActionListener(new java.awt.event.ActionList

28、ener() public void actionPerformed(java.awt.event.ActionEvent e) Regsdit regsdit=new Regsdit();regsdit.getJFrame();jFrame.setVisible(false););return jButton1;/* * This method initializes jPasswordField * * return */private JPasswordField getJPasswordField() if (jPasswordField = null) jPasswordField

29、= new JPasswordField();jPasswordField.setBounds(new Rectangle(211, 121, 225, 29);return jPasswordField;public static void main(String a)MainMenu mainmenu=new MainMenu();mainmenu.getJFrame();MainCl类package view;import javax.swing.JFrame;import javax.swing.JPanel;import java.awt.Dimension;import java.

30、awt.Rectangle;import javax.swing.*;import access.Access;public class MainCl private JFrame jFrame = null; / jve:decl-index=0:visual-constraint=203,74private JPanel jPanel = null;private JPanel jPanel1 = null;private JLabel jLabel6 = null;private JLabel jLabel7 = null;private JButton jButton = null;p

31、rivate JButton jButton1 = null;private JButton jButton2 = null;private JButton jButton3 = null;private JButton jButton4 = null;private JButton jButton5 = null;private JButton jButton6 = null;/* * This method initializes jFrame * * return */public JFrame getJFrame() if (jFrame = null) jFrame = new JF

32、rame();jFrame.setSize(new Dimension(420, 333);jFrame.setTitle(图书管理系统);jFrame.setContentPane(getJPanel();jFrame.setVisible(true);return jFrame;/* * This method initializes jPanel * * return */private JPanel getJPanel() if (jPanel = null) jPanel = new JPanel();jPanel.setLayout(null);jPanel.add(getJPan

33、el1(), null);jPanel.add(getJButton(), null);jPanel.add(getJButton1(), null);jPanel.add(getJButton2(), null);jPanel.add(getJButton3(), null);jPanel.add(getJButton4(), null);jPanel.add(getJButton5(), null);jPanel.add(getJButton6(), null);return jPanel;/* * This method initializes jPanel1 * * return */

34、private JPanel getJPanel1() if (jPanel1 = null) jLabel7 = new JLabel();jLabel7.setBounds(new Rectangle(6, 21, 376, 18);jLabel7.setText( 插入,修改,删除操作仅管理员可以操作。);jLabel6 = new JLabel();jLabel6.setBounds(new Rectangle(6, 1, 382, 22);jLabel6.setText(有关操作提醒;);jPanel1 = new JPanel();jPanel1.setLayout(null);j

35、Panel1.setBounds(new Rectangle(12, 211, 391, 41);jPanel1.add(jLabel6, null);jPanel1.add(jLabel7, null);return jPanel1;/* * This method initializes jButton * * return */private JButton getJButton() if (jButton = null) jButton = new JButton();jButton.setBounds(new Rectangle(15, 44, 150, 34);jButton.se

36、tText(插入书);jButton.addActionListener(new java.awt.event.ActionListener() public void actionPerformed(java.awt.event.ActionEvent e) Insert insert=new Insert();insert.getJFrame();jFrame.setVisible(false););return jButton;/* * This method initializes jButton1 * * return */private JButton getJButton1()

37、if (jButton1 = null) jButton1 = new JButton();jButton1.setBounds(new Rectangle(15, 105, 151, 31);jButton1.setText(修改书);jButton1.addActionListener(new java.awt.event.ActionListener() public void actionPerformed(java.awt.event.ActionEvent e) new Update().getJFrame();jFrame.setVisible(false););return j

38、Button1;/* * This method initializes jButton2 * * return */private JButton getJButton2() if (jButton2 = null) jButton2 = new JButton();jButton2.setBounds(new Rectangle(16, 164, 150, 31);jButton2.setText(删除书);jButton2.addActionListener(new java.awt.event.ActionListener() public void actionPerformed(j

39、ava.awt.event.ActionEvent e) new Delete().getJFrame();jFrame.setVisible(false););return jButton2;/* * This method initializes jButton3 * * return */private JButton getJButton3() if (jButton3 = null) jButton3 = new JButton();jButton3.setBounds(new Rectangle(211, 45, 150, 33);jButton3.setText(查看书);jButton3.addActionListener(new java.awt.event.ActionListener() public void actionPerformed(java.awt.event.ActionEvent e) Access access=new Access();access.loo

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2024 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服