• 大小: 413KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-29
  • 语言: Java
  • 标签:

资源简介

java写的基于C/S模式的图书管理系统,包括借书、还书、读者管理、图书维护、系统参数设置等功能,功能完善。

资源截图

代码片段和文件信息

package bookMgr;

import java.awt.BorderLayout;

import java.awt.Color;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import clientside.LibClient;
import clientside.Mainframe;
import clientside.ServerInfo;

import serverside.BookDetails;

public class BookAddPanel extends JPanel {
/**
 * 
 */
private static final long serialVersionUID = 1L;
protected Mainframe parentframe;
protected LibClient libClient;
protected BookDetails bookdetails;
protected JLabel isbnLabel;
protected JTextField isbnValue;
protected JLabel nameLabel;
protected JTextField nameValue;
protected JLabel seriesLabel;
protected JTextField seriesValue;
protected JLabel authorsLabel;
protected JTextField authorsValue;
protected JLabel publisherLabel;
protected JTextField publisherValue;
protected JLabel fileLabel;
protected JTextField fileValue;
protected JButton fileButton;
protected JLabel sizeLabel;
protected JTextField sizeValue;
protected JLabel pagesLabel;
protected JTextField pagesValue;
protected JLabel priceLabel;
protected JTextField priceValue;
protected JLabel introLabel;
protected JTextArea introValue;
protected JLabel clnumLabel;
protected JTextField clnumValue;
    protected File file;
protected JButton addButton;
protected JButton cancelButton;
protected JButton barButton;
    protected ArrayList isbnList;
public BookAddPanel(Mainframe theParentframe) {
try {
parentframe = theParentframe;
this.setLayout(new BorderLayout());

// 连接服务器
ServerInfo serverInfo = new ServerInfo();
libClient = new LibClient(serverInfo.getHost() serverInfo
.getPort());

buildBookData();

JPanel bottomPanel = new JPanel();
addButton = new JButton(“增加“);
addButton.addMouseListener(new addMouseListener());
cancelButton = new JButton(“取消“);
cancelButton.addMouseListener(new buttonMouseListener());
barButton = new JButton(“入库“);
barButton.addMouseListener(new buttonMouseListener());

bottomPanel.add(addButton);
bottomPanel.add(cancelButton);
bottomPanel.add(barButton);
this.add(bottomPanel BorderLayout.SOUTH);
} catch (IOException exc) {
JOptionPane.showMessageDialog(this “网络连接故障: “ + exc “网络问题“
JOptionPane.ERROR_MESSAGE);
System.exit(1);
}

}

/**
 * 构造图书具体信息面板,位于north
 */

private void buildBookData() {
JPanel bookDataPanel = new JPanel();
bookDataPanel.setLayout(new GridBagL

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        232  2009-10-13 16:18  library\.classpath

     文件        383  2009-10-13 16:18  library\.project

     文件       4181  2009-10-13 16:18  library\bin\bookMgr\BookAddPanel$addMouseListener.class

     文件       1465  2009-10-13 16:18  library\bin\bookMgr\BookAddPanel$buttonMouseListener.class

     文件       1929  2009-10-13 16:18  library\bin\bookMgr\BookAddPanel$fileMouseListener.class

     文件       6255  2009-10-13 16:18  library\bin\bookMgr\BookAddPanel.class

     文件       1832  2009-10-13 16:18  library\bin\bookMgr\BookBarAddDialog$AddBarMouseListener.class

     文件       2353  2009-10-13 16:18  library\bin\bookMgr\BookBarAddDialog$ListItemMouseListener.class

     文件       5763  2009-10-13 16:18  library\bin\bookMgr\BookBarAddDialog.class

     文件       1331  2009-10-13 16:18  library\bin\bookMgr\BookBarUpdDialog$CancelMouseListener.class

     文件       2074  2009-10-13 16:18  library\bin\bookMgr\BookBarUpdDialog$FindMouseListener.class

     文件       2239  2009-10-13 16:18  library\bin\bookMgr\BookBarUpdDialog$UpdMouseListener.class

     文件       4786  2009-10-13 16:18  library\bin\bookMgr\BookBarUpdDialog.class

     文件       1010  2009-10-13 16:18  library\bin\bookMgr\BookDelPanel$DelBarButton.class

     文件       1018  2009-10-13 16:18  library\bin\bookMgr\BookDelPanel$DelDetailButton.class

     文件        932  2009-10-13 16:18  library\bin\bookMgr\BookDelPanel$DelDetailKey.class

     文件        936  2009-10-13 16:18  library\bin\bookMgr\BookDelPanel$DelLibraryKey.class

     文件       4907  2009-10-13 16:18  library\bin\bookMgr\BookDelPanel.class

     文件       3828  2009-10-13 16:18  library\bin\bookMgr\BookUpdPanel$addMouseListener.class

     文件       1465  2009-10-13 16:18  library\bin\bookMgr\BookUpdPanel$buttonMouseListener.class

     文件       2228  2009-10-13 16:18  library\bin\bookMgr\BookUpdPanel$fileMouseListener.class

     文件       2979  2009-10-13 16:18  library\bin\bookMgr\BookUpdPanel$FindMouseListener.class

     文件       6782  2009-10-13 16:18  library\bin\bookMgr\BookUpdPanel.class

     文件       1508  2009-10-13 16:18  library\bin\bookMgr\SimpleFileFilter.class

     文件       1106  2009-10-13 16:18  library\bin\bookMgr\UpdownImage.class

     文件       2203  2009-10-13 16:18  library\bin\borrow\BookForm.class

     文件       1170  2009-10-13 16:18  library\bin\borrow\BorrowBook$BorrowActionListener.class

     文件       1354  2009-10-13 16:18  library\bin\borrow\BorrowBook$KeyButtonKeyListener.class

     文件        934  2009-10-13 16:18  library\bin\borrow\BorrowBook$KeyFieldKeyListener.class

     文件       6441  2009-10-13 16:18  library\bin\borrow\BorrowBook.class

............此处省略175个文件信息

评论

共有 条评论

相关资源