资源描述:
《基于java的图书管理系统源代码资料》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、声明:本系统是基于C/S的图书管理系统,主要使用的是Oracle数据库,下面附所有实现代码packagelibrary;importjava.awt.BorderLayout;importjava.awt.Container;importjava.awt.GridLayout;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.sql.ResultSet;importjavax.swing.JButto
2、n;importjavax.swing.JComboBox;importjavax.swing.JFrame;importjavax.swing.JLabel;importjavax.swing.JOptionPane;importjavax.swing.JPanel;importjavax.swing.JTextField;publicclassbook_addextendsJFrameimplementsActionListener{DataBaseManagerdb=newDataBaseManager
3、();ResultSetrs;JPanelpanel1,panel2;JLabelbook_id_label,book_name_label,author_label,press_label,press_date_label,price_label,book_num_label,borrowed_num_label,address;JTextFieldbook_id_TextField,book_name_TextField,author_TextField,press_TextField,press_dat
4、e_TextField,price_TextField,book_num_TextField,borrowed_count;JComboBoxaddresst;Containerc;JButtonclear,add,exit;publicbook_add(){super("添加图书信息");c=getContentPane();c.setLayout(newBorderLayout());book_id_label=newJLabel("编号",JLabel.CENTER);book_name_label=n
5、ewJLabel("名称",JLabel.CENTER);author_label=newJLabel("作者",JLabel.CENTER);press_label=newJLabel("出版社",JLabel.CENTER);press_date_label=newJLabel("出版日期",JLabel.CENTER);price_label=newJLabel("价格",JLabel.CENTER);book_num_label=newJLabel("库存数",JLabel.CENTER);borro
6、wed_num_label=newJLabel("已借阅数",JLabel.CENTER);address=newJLabel("藏书地址",JLabel.CENTER);book_id_TextField=newJTextField(15);book_name_TextField=newJTextField(15);author_TextField=newJTextField(15);press_TextField=newJTextField(15);press_date_TextField=newJTex
7、tField(15);price_TextField=newJTextField(15);book_num_TextField=newJTextField(15);borrowed_count=newJTextField(15);borrowed_count.setText("0");addresst=newJComboBox();addresst.addItem("扬子津图书馆");addresst.addItem("荷花池图书馆");addresst.addItem("瘦西湖图书馆");addresst.
8、addItem("淮海路图书馆");panel1=newJPanel();panel1.setLayout(newGridLayout(9,2));panel1.add(book_id_label);panel1.add(book_id_TextField);panel1.add(book_name_label);panel1.add(book_name_TextField);panel1.add(