資源簡介
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個文件信息
- 上一篇:java的MP3播放插件
- 下一篇:Java的循環單鏈表及其測試程序
評論
共有 條評論