欢迎来到冰点文库! | 帮助中心 分享价值,成长自我!
冰点文库
全部分类
  • 临时分类>
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • ImageVerifierCode 换一换
    首页 冰点文库 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    图书管理系统数据库源代码.docx

    • 资源ID:16885369       资源大小:22.26KB        全文页数:35页
    • 资源格式: DOCX        下载积分:6金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要6金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    图书管理系统数据库源代码.docx

    1、图书管理系统数据库源代码图书管理系统数据库源代码/创建工程及设计主界面public class Main extends JFrame private static final JDesktopPane DESKTOP_PANE=new JDesktopPane(); /桌面窗体 public static void main(String args) /入口方法 try UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName(); /设置系统界面外观 new BookLogin(); /登录窗口 catch(Excep

    2、tion ex) ex.printStackTrace(); public static void addIFame(JInternalFrame iframe) /添加子窗体的方法 DESKTOP_PANE.add(iframe); /新增子窗体 public Main() super(); /设置“关闭”按钮处理事件 setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); /创建工具栏 Toolkit tool=Toolkit,getDefaultToolkit(); /获得屏幕大小 Dimension screenSize=too

    3、l.getScreenSize(); setSize(800,600); /设置窗体大小 setLocation(screenSize.width-getWidth()/2,(screenSize.height-getHeight()/2; /设置窗体位置 setTitle(图书管理系统); /设置窗体标题 JMenuBar menuBar=createMenu(); /创建菜单栏 setJMenuBar(menuBar); /设置菜单栏 JToolBar toolBar=createToolBar(); /创建工具栏的方法 getContentPane(),add(toolBar,Borde

    4、rLayout.NORTH); /设置工具栏 final JLable lable=new JLable(); /创建一个标签,用来显示图片 lable.setBounds(0,0,0,0); /设置窗体的大小和位置 lable.setIcon(null); /窗体背景 DESKTOP_PANE.addComponentListener(new ComponentAdapter() public void componentResized(final ComponentEvent e) Dimension size=e.getComponent().getSize(); /获得组建大小 lab

    5、le.setSize(e.getComponent().getSize(); /设置标签大小 lable.setText(); /设置标签文本,设置窗口背景 /将标签添加到桌面窗体 DESKTOP_PANE.add(lable,new Integer(Integer.MIN_VALUE); getContentPane().add(DESKTOP_PANE); /将桌面窗体添加到主窗体中 private JToolBar createToolBar() /创建工具栏的方法 JToolBar toolBar=new JToolBar(); /初始化工具栏 toolBar.setFloatable

    6、(false); /设置是否可以移动工具栏 toolBar.setBorder(new BevelBorder(BevelBorder.RAIZED); /设置边框 /图书信息添加按钮 JButton bookAddButton=new JButton(MenuActions.BOOK_ADD); ImageIcon icon=new ImageIcon(Main.class.getResource(/bookAddtb.jpg); /添加菜单栏图标 bookAddButton.setIcon(icon); /设置按钮图标 bookAddButton.setHideActionText(tru

    7、e); /显示提示文本 toolBar.add(bookAddButton); /添加到工具栏中 JButton bookModiAndDelButton=new JButton(MenuActions.BOOK_MODIFY); /图书信息修改按钮 ImageIcon bookmodiicon=Icon.add(bookModiAndDeltb.jpg); /创建图表方法 bookModiAndDelButton.setIcon(bookmodiicon); /设置按钮图标 bookModiAndDelButton.setHideActionText(true); /显示提示文本 toolB

    8、ar.add(bookModiAndDelButton); /添加到工具栏 JButton bookTypeAddButton=new JButton(MenuActions.BOOKTYPE_ADD); /图书类别添加按钮 ImageIcon bookTypeAddicon=Icon.add(bookTypeAddtb.jpg); /创建图标方法 bookTypeAddButton.setIcon(bookTypeAddicon); /设置按钮图标 bookTypeAddButton.setHideActionText(true); /显示提示文本 toolBar.add(bookTypeA

    9、ddButton); /添加到工具栏 JButton bookBorrowButton=new JButton(MenuActions.BORROW); /图书借阅按钮 ImageIcon bookBorrowicon=Icon.add(bookBorrowtb.jpg); /创建图标方法 bookBorrowButton.setIcon(bookBorrowicon); /设置按钮图标 bookBorrowButton.setHideActionText(true); /显示提示文本 toolBar.add(bookBorrowButton); /添加到工具栏 JButton bookOrd

    10、erButton=new JButton(MenuActions.NEWBOOK_ORDER); /新书订购按钮 ImageIcon bookOrdericon=Icon.add(bookOrdertb.jpg); /创建图标方法 bookOrderButton.setIcon(bookOrdericon); /设置按钮图标 bookOrderButton.setHideActionText(true); /显示提示文本 toolBar.add(bookOrderButton); /添加到工具栏 JButton bookCheckButton=new JButton(MenuActions.N

    11、EWBOOK_CHECK); /验收新书按钮 ImageIcon bookCheckicon=Icon.add(newbookChecktb.jpg); /创建图标方法 bookCheckButton.setIcon(bookCheckicon); /设置按钮图标 bookCheckButton.setHideActionText(true); /显示提示文本 toolBar.add(bookCheckButton); /添加到工具栏 JButton readerAddButton=new JButton(MenuActions.READER_ADD); /读者信息添加按钮 ImageIcon

    12、 readerAddicon=Icon.add(readerAddtb.jpg); /创建图标方法 readerAddButton.setIcon(readerAddicon); /设置按钮图标 readerAddButton.setHideActionText(true); /显示提示文本 toolBar.add(readerAddButton); /添加到工具栏 JButton readerModiAndDelButton=new JButton(MenuActions.READER_MODIFY); /读者信息修改按钮 ImageIcon readerModiAndDelicon=Ico

    13、n.add(readerModiAndDeltb.jpg); /创建图标方法 readerModiAndDelButton.setIcon(readerModiAndDelicon); /设置按钮图标 readerModiAndDelButton.setHideActionText(true); /显示提示文本 toolBar.add(readerModiAndDelButton); /添加到工具栏 JButton ExitButton=new JButton(MenuActions.EXIT); /退出系统按钮 ImageIcon Exiticon=Icon.add(exittb.jpg);

    14、 /创建图标方法 ExitButton.setIcon(Exiticon); /设置按钮图标 ExitButton.setHideActionText(true); /显示提示文本 toolBar.add(ExitButton); /添加到工具栏 return toolBar;public class Business protected static String dbClassName=com.mysql.jdbc.Driver; /数据库驱动类 protected static String dbUr1=jdbc:mysql:/localhost/ts; /连接URL protected

    15、 static String dbUser=root; /数据库用户名 protected static String dbpwd=root; /数据库密码 private static Connection conn=null; /数据库连接对象,初值为null public Business() try if(coon=null) /连接对象为空 Class.forName(dbClassName); /加载驱动类信息 conn=DriverManager.getConnection(dbUr1,dbUser,dbPwd); /建立连接对象 catch(Exception ee) ee.p

    16、rintStackTrace(); public static ResultSet executeQuery(String sql) /执行查询方法 try /如果连接对象为空,则重新调用构造方法 if (conn=null) new Business(); return conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE).executeQuery(sql); /执行查询 catch(SQLException e) e.printStackTrace(); return null; /

    17、返回null值 finally public static int executeUpdata(String sql) /更新方法 try if(conn=null) new Business(); /如果连接对象为空,则重新调用构造方法 return conn.createStatement().executeUpdate(sql); /执行更新 catch(SQLException e) e.printStackTrace(); return -1; finally public static void close() /关闭方法 try conn.close(); /关闭连接对象 cat

    18、ch(SQLException e) e.printStackTrace(); finally conn=null; /设置连接对象为null值 /为数据库添加对应的类public class BookInfo private String Book_id; /图书编号 private String typeid; /类别编号 private String writer; /作者 private String translator; /译者 private String publisher; /出版社 private Date date; /出版日期 private Double price;

    19、 /图书单价 private String getBookname; /图书名称 public String getBookname() return bookname; public void setBookname(String bookname) this.bookname=bookname; public Date getDate() return date; public void setDate(Date date) this.date=date; public string getBook_id() return Book_id; public void setBook_id(S

    20、tring Book_id) this.Book_id=Book_id; public Double getPrice() return price; public void setprice(Double price) this.price=price; public String getPublisher() return Publisher; public void setPublisher(String publisher) this.Publisher=Publisher; public String getTranslator() return translator; public

    21、 void setTranslator(String translator) this.translator=translator; public String getTypeid() return typeid; public void setTypeid(String typeid) this.typeid=typeid; public String getWriter() return writer; public void setWriter(String writer) this.writer=writer; public class BookType /图书列表信息类 privat

    22、e String id; /图书类别编号 private String typeName; /图书类别名称 private String days; /可解天数 private String fk; /每罚款金额 public String getFk() return fk; public void setFk(String fk) this.fk=fk; public String getDays() return days; public void setDays(String days) this.days=days; public string getId() return id;

    23、public void setId(String id) this.Bid=id; public String getTypeName() return typeName; public void setTypeName(String typeName) this.typeName=typeName; public class Order /图书订单信息类 private String Book_id; /图书编号 private Date date; /下单时间 private String number; /图书数量 private String operator; /操作员 privat

    24、e String checkAndAccept; /是否收到货 private String zk; /图书折扣 public String getcheckAndAccept() return checkAndAccept; public void setcheckAndAccept(String checkAndAccept) this.checkAndAccept=checkAndAccept; public Date getDate() return date; public void setDate(Date date) this.date=date; public string g

    25、etBook_id() return book_id; public void setBook_id(String book_id) this.book_id=book_id; public String getNumber() return number; public void setNumber(String number) this.number=number; public String getOperator() return operator; public void setOperator(String operator) this.operatorr=operator; pu

    26、blic String getZk() return zk; public void setZk(String Zk) this.zk=zk; public class Operater private String id; /操作员编号 private String name; /操作员用户名 private String grade; /操作员等级 private String password; /操作员密码 private String type; /出版社 public String getType() return type; public void setType(String

    27、type) this.type=type; public string getGrade() return grade; public void setGrade(String grade) this.grade=grade; public String getId() return id; public void setId(String id) this.id=id; public String getName() return name; public void setName(String name) this.name=name; public String getPassword(

    28、) return password; public void setPassword(String password) this.password=password; public class Borrow /书籍借阅信息类 private int id; /借阅编号 private String book_id; /图书编号 private String reader_id; /读者编号 private String num; /借书数量 private String borrowDate; /借书日期 private String backDate; /应还日期 private String Bo


    注意事项

    本文(图书管理系统数据库源代码.docx)为本站会员主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2023 冰点文库 网站版权所有

    经营许可证编号:鄂ICP备19020893号-2


    收起
    展开