*****************************************************
基于Java swing+mysql的图书管理系统
系统主要有四个模块:基础数据维护(图书类型、图书信息的维护),新书订购管理(新书的预定、验收),借阅管理(读者管理、借书订单维护等),系统维护(管理员信息维护,密码修改等)。
话不多说直接上图(源码在最后):
1.登录界面,用户名:whj 密码:123
package com.wsy.iframe;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import com.wsy.Library;
import com.wsy.dao.Dao;
import com.wsy.model.Operater;
import com.wsy.util.CreatecdIcon;
import com.wsy.util.MyDocument;
public class BookLoginIFrame extends JFrame {
private class BookResetAction implements ActionListener {
public void actionPerformed(final ActionEvent e){
username.setText("");
password.setText("");
}
}
class BookLoginAction implements ActionListener {
public void actionPerformed(final ActionEvent e) {
user = Dao.check(username.getText(), password.getText());
if (user.getName() != null) {
try {
Library frame = new Library();
frame.setVisible(true);
BookLoginIFrame.this.setVisible(false);
} catch (Exception ex) {
ex.printStackTrace();
}
} else {
JOptionPane.showMessageDialog(null, "只有管理员才可以登录!");
username.setText("");
password.setText("");
}
}
}
private JPasswordField password;
private JTextField username;
private JButton login;
private JButton reset;
private static Operater user;
/**
* Launch the application
* @param args
*/
/**
* Create the frame
*/
public BookLoginIFrame() {
super();
final BorderLayout borderLayout = new BorderLayout();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
borderLayout.setVgap(10);
getContentPane().setLayout(borderLayout);
setTitle("图书馆管理系统登录");
setBounds(100, 100, 285, 194);
final JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
panel.setBorder(new EmptyBorder(0, 0, 0, 0));
getContentPane().add(panel);
final JPanel panel_2 = new JPanel();
final GridLayout gridLayout = new GridLayout(0, 2);
gridLayout.setHgap(5);
gridLayout.setVgap(20);
panel_2.setLayout(gridLayout);
panel.add(panel_2);
final JLabel label = new JLabel();
label.setHorizontalAlignment(SwingConstants.CENTER);
label.setPreferredSize(new Dimension(0, 0));
label.setMinimumSize(new Dimension(0, 0));
panel_2.add(label);
label.setText("用 户 名:");
username = new JTextField(20);
username.setPreferredSize(new Dimension(0, 0));
panel_2.add(username);
final JLabel label_1 = new JLabel();
label_1.setHorizontalAlignment(SwingConstants.CENTER);
panel_2.add(label_1);
label_1.setText("密 码:");
password = new JPasswordField(20);
password.setDocument(new MyDocument(6));
password.setEchoChar('*');//设置密码框的回显字符
password.addKeyListener(new KeyAdapter() {
public void keyPressed(final KeyEvent e) {
if (e.getKeyCode() == 10)
login.doClick();
}
});
panel_2.add(password);
final JPanel panel_1 = new JPanel();
panel.add(panel_1, BorderLayout.SOUTH);
login=new JButton();
login.addActionListener(new BookLoginAction());
login.setText("登录");
panel_1.add(login);
reset=new JButton();
reset.addActionListener(new BookResetAction());
reset.setText("重置");
panel_1.add(reset);
final JLabel tupianLabel = new JLabel();
ImageIcon loginIcon=CreatecdIcon.add("login.jpg");
tupianLabel.setIcon(loginIcon);
tupianLabel.setOpaque(true);
tupianLabel.setBackground(Color.GREEN);
tupianLabel.setPreferredSize(new Dimension(260, 60));
panel.add(tupianLabel, BorderLayout.NORTH);
//
setVisible(true);
setResizable(false);
//setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
}
public static Operater getUser() {
return user;
}
public static void setUser(Operater user) {
BookLoginIFrame.user = user;
}
}
2.基础数据管理页面
3.基础信息管理页面
package com.wsy;
import java.awt.event.ActionEvent;
import java.util.HashMap;
import java.util.Map;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JInternalFrame;
import com.wsy.iframe.BookAddIFrame;
import com.wsy.iframe.BookBackIFrame;
import com.wsy.iframe.BookBorrowIFrame;
import com.wsy.iframe.BookModiAndDelIFrame;
import com.wsy.iframe.BookSearchIFrame;
import com.wsy.iframe.BookTypeAddIFrame;
import com.wsy.iframe.BookTypeModiAndDelIFrame;
import com.wsy.iframe.GengGaiMiMa;
import com.wsy.iframe.ReaderAddIFrame;
import com.wsy.iframe.ReaderModiAndDelIFrame;
import com.wsy.iframe.UserAddIFrame;
import com.wsy.iframe.UserModiAndDelIFrame;
import com.wsy.iframe.newBookCheckIFrame;
import com.wsy.iframe.newBookOrderIFrame;
import com.wsy.util.*;
/**
* 菜单和按钮的Action对象
*
*/
public class MenuActions {
private static Map<String, JInternalFrame> frames; // 子窗体集合
public static PasswordModiAction MODIFY_PASSWORD; // 修改密码窗体动作
public static UserModiAction USER_MODIFY; // 修改用户资料窗体动作
public static UserAddAction USER_ADD; // 用户添加窗体动作
public static BookSearchAction BOOK_SEARCH; // 图书搜索窗体动作
public static GiveBackAction GIVE_BACK; // 图书归还窗体动作
public static BorrowAction BORROW; // 图书借阅窗体动作
public static CheckAndAcceptNewBookAction NEWBOOK_CHECK_ACCEPT;// 修改密码动作
public static BoodOrderAction NEWBOOK_ORDER; // 新书定购窗体动作
public static BookTypeModiAction BOOKTYPE_MODIFY; // 图书类型修改窗体动作
public static BookTypeAddAction BOOKTYPE_ADD; // 图书类型添加窗体动作
public static ReaderModiAction READER_MODIFY; // 读者信息修改窗体动作
public static ReaderAddAction READER_ADD; // 读者信息添加窗体动作
public static BookModiAction BOOK_MODIFY; // 图书信息修改窗体动作
public static BookAddAction BOOK_ADD; // 图书信息添加窗体动作
public static ExitAction EXIT; // 系统退出动作
static {
frames = new HashMap<String, JInternalFrame>();
MODIFY_PASSWORD = new PasswordModiAction();
USER_MODIFY = new UserModiAction();
USER_ADD = new UserAddAction();
BOOK_SEARCH = new BookSearchAction();
GIVE_BACK = new GiveBackAction();
BORROW = new BorrowAction();
NEWBOOK_CHECK_ACCEPT = new CheckAndAcceptNewBookAction();
NEWBOOK_ORDER = new BoodOrderAction();
BOOKTYPE_MODIFY = new BookTypeModiAction();
BOOKTYPE_ADD = new BookTypeAddAction();
READER_MODIFY = new ReaderModiAction();
READER_ADD = new ReaderAddAction();
BOOK_MODIFY = new BookModiAction();
BOOK_ADD = new BookAddAction();
EXIT = new ExitAction();
}
private static class PasswordModiAction extends AbstractAction {
PasswordModiAction() {
putValue(Action.NAME,"更改口令");
putValue(Action.LONG_DESCRIPTION, "修改当前用户密码");
putValue(Action.SHORT_DESCRIPTION, "更换口令");//在“更改口令”提示中显示的文字
//putValue(Action.SMALL_ICON,CreatecdIcon.add("bookAddtb.jpg"));
//将图标存储到动作对象中
//setEnabled(false);//使动作禁用
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("更改密码")||frames.get("更改密码").isClosed()) {
GengGaiMiMa iframe=new GengGaiMiMa();
frames.put("更改密码", iframe);
Library.addIFame(frames.get("更改密码"));
}
}
}
private static class UserModiAction extends AbstractAction {
UserModiAction() {
super("用户修改与删除", null);
putValue(Action.LONG_DESCRIPTION, "修改和删除用户信息");
putValue(Action.SHORT_DESCRIPTION, "用户修改与删除");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("用户信息修改与删除")||frames.get("用户信息修改与删除").isClosed()) {
UserModiAndDelIFrame iframe=new UserModiAndDelIFrame();
frames.put("用户信息修改与删除", iframe);
Library.addIFame(frames.get("用户信息修改与删除"));
}
}
}
private static class UserAddAction extends AbstractAction {
UserAddAction() {
super("用户添加", null);
putValue(Action.LONG_DESCRIPTION, "添加新的用户");
putValue(Action.SHORT_DESCRIPTION, "用户添加");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("用户信息添加")||frames.get("用户信息添加").isClosed()) {
UserAddIFrame iframe=new UserAddIFrame();
frames.put("用户信息添加", iframe);
Library.addIFame(frames.get("用户信息添加"));
}
}
}
private static class BookSearchAction extends AbstractAction {
BookSearchAction() {
super("图书搜索", null);
putValue(Action.LONG_DESCRIPTION, "搜索入库的图书信息");
putValue(Action.SHORT_DESCRIPTION, "图书搜索");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("图书查询")||frames.get("图书查询").isClosed()) {
BookSearchIFrame iframe=new BookSearchIFrame();
frames.put("图书查询", iframe);
Library.addIFame(frames.get("图书查询"));
}
}
}
private static class GiveBackAction extends AbstractAction {
GiveBackAction() {
super("图书归还", null);
putValue(Action.LONG_DESCRIPTION, "归还借阅的图书");
putValue(Action.SHORT_DESCRIPTION, "图书归还");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("图书归还管理")||frames.get("图书归还管理").isClosed()) {
BookBackIFrame iframe=new BookBackIFrame();
frames.put("图书归还管理", iframe);
Library.addIFame(frames.get("图书归还管理"));
}
}
}
private static class BorrowAction extends AbstractAction {
BorrowAction() {
super("图书借阅", null);
putValue(Action.LONG_DESCRIPTION, "从图书馆借阅图书");
putValue(Action.SHORT_DESCRIPTION, "图书借阅");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("图书借阅管理")||frames.get("图书借阅管理").isClosed()) {
BookBorrowIFrame iframe=new BookBorrowIFrame();
frames.put("图书借阅管理", iframe);
Library.addIFame(frames.get("图书借阅管理"));
}
}
}
private static class CheckAndAcceptNewBookAction extends AbstractAction {
CheckAndAcceptNewBookAction() {
super("验收新书", null);
putValue(Action.LONG_DESCRIPTION, "验收订阅的新图书");
putValue(Action.SHORT_DESCRIPTION, "验收新书");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("图书验收")||frames.get("图书验收").isClosed()) {
newBookCheckIFrame iframe=new newBookCheckIFrame();
frames.put("图书验收", iframe);
Library.addIFame(frames.get("图书验收"));
}
}
}
private static class BoodOrderAction extends AbstractAction {
BoodOrderAction() {
super("新书定购", null);
putValue(Action.LONG_DESCRIPTION, "定购新的图书");
putValue(Action.SHORT_DESCRIPTION, "新书定购");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("新书订购管理")||frames.get("新书订购管理").isClosed()) {
newBookOrderIFrame iframe=new newBookOrderIFrame();
frames.put("新书订购管理", iframe);
Library.addIFame(frames.get("新书订购管理"));
}
}
}
private static class BookTypeModiAction extends AbstractAction {
BookTypeModiAction() {
super("图书类别修改", null);
putValue(Action.LONG_DESCRIPTION, "修改图书的类别信息");
putValue(Action.SHORT_DESCRIPTION, "图书类别修改");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("图书类别修改")||frames.get("图书类别修改").isClosed()) {
BookTypeModiAndDelIFrame iframe=new BookTypeModiAndDelIFrame();
frames.put("图书类别修改", iframe);
Library.addIFame(frames.get("图书类别修改"));
}
}
}
private static class BookTypeAddAction extends AbstractAction {
BookTypeAddAction() {
super("图书类别添加", null);
putValue(Action.LONG_DESCRIPTION, "为图书馆添加新的图书类别");
putValue(Action.SHORT_DESCRIPTION, "图书类别添加");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("图书类别添加")||frames.get("图书类别添加").isClosed()) {
BookTypeAddIFrame iframe=new BookTypeAddIFrame();
frames.put("图书类别添加", iframe);
Library.addIFame(frames.get("图书类别添加"));
}
}
}
private static class ReaderModiAction extends AbstractAction {
ReaderModiAction() {
super("读者修改与删除", null);
putValue(Action.LONG_DESCRIPTION, "修改和删除读者的基本信息");
putValue(Action.SHORT_DESCRIPTION, "读者修改与删除");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("读者信息修改与删除")||frames.get("读者信息修改与删除").isClosed()) {
ReaderModiAndDelIFrame iframe=new ReaderModiAndDelIFrame();
frames.put("读者信息修改与删除", iframe);
Library.addIFame(frames.get("读者信息修改与删除"));
}
}
}
private static class ReaderAddAction extends AbstractAction {
ReaderAddAction() {
super("读者信息添加", null);
putValue(Action.LONG_DESCRIPTION, "为图书馆添加新的读者会员信息");
putValue(Action.SHORT_DESCRIPTION, "读者信息添加");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("读者相关信息添加")||frames.get("读者相关信息添加").isClosed()) {
ReaderAddIFrame iframe=new ReaderAddIFrame();
frames.put("读者相关信息添加", iframe);
Library.addIFame(frames.get("读者相关信息添加"));
}
}
}
//图书修改与删除
private static class BookModiAction extends AbstractAction {
BookModiAction() {
super("图书修改", null);
putValue(Action.LONG_DESCRIPTION, "修改和删除图书信息");
putValue(Action.SHORT_DESCRIPTION, "图书修改");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("图书修改")||frames.get("图书修改").isClosed()) {
BookModiAndDelIFrame iframe=new BookModiAndDelIFrame();
frames.put("图书修改", iframe);
Library.addIFame(frames.get("图书修改"));
}
}
}
private static class BookAddAction extends AbstractAction { // 图书信息添加---已经实现,请参照
BookAddAction() {
super("图书信息添加", null);
//super();
putValue(Action.LONG_DESCRIPTION, "为图书馆添加新的图书信息");
putValue(Action.SHORT_DESCRIPTION, "图书信息添加");
}
public void actionPerformed(ActionEvent e) {
if (!frames.containsKey("图书信息添加")||frames.get("图书信息添加").isClosed()) {
BookAddIFrame iframe = new BookAddIFrame();
frames.put("图书信息添加", iframe);
Library.addIFame(frames.get("图书信息添加"));
}
}
}
private static class ExitAction extends AbstractAction { // 退出系统动作
public ExitAction() {
super("退出系统", null);
putValue(Action.LONG_DESCRIPTION, "退出图书馆管理系统");
putValue(Action.SHORT_DESCRIPTION, "退出系统");
}
public void actionPerformed(final ActionEvent e) {
System.exit(0);
}
}
private MenuActions() {
super();
}
}
4.新书订购管理页面
5.图书借阅管理页面
package com.wsy.iframe;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Map;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
import javax.swing.JFormattedTextField;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableModel;
import com.wsy.JComPz.MapPz;
import com.wsy.dao.Dao;
import com.wsy.model.Operater;
import com.wsy.model.OrderAndBookInfo;
public class newBookCheckIFrame extends JInternalFrame {
private JTextField bookType;
private JTextField orderPrice;
private JTextField zk;
private JTable table;
private ButtonGroup buttonGroup = new ButtonGroup();
private JTextField price;
private JTextField operator;
private JTextField orderNumber;
private JTextField ISBN;
private JFormattedTextField orderDate;
private Operater user = BookLoginIFrame.getUser();
JRadioButton radioButton2;
JRadioButton radioButton1;
private String[] columnNames={ "图书编号", "订购日期", "订购数量","操作员","是否验收","折扣","图书类别","图书名称","作者","译者","出版社","出版日期","图书价格"};
private Map map=MapPz.getMap();
private Object[][] getFileStates(List list){
Object[][]results=new Object[list.size()][columnNames.length];
for(int i=0;i<list.size();i++){
OrderAndBookInfo order=(OrderAndBookInfo)list.get(i);
results[i][0]=order.getISBN();
results[i][1]=order.getOrderdate();
results[i][2]=order.getNumber();
results[i][3]=order.getOperator();
String CheckAndAccepts;
if(order.getCheckAndAccept().equals("1"))//1代表没有验收
CheckAndAccepts="否";
else
CheckAndAccepts="是";
results[i][4]=CheckAndAccepts;
results[i][5]=order.getZk();
String bookTypes=String.valueOf(MapPz.getMap().get(order.getTypeId()));
results[i][6]=bookTypes;
results[i][7]=order.getBookname();
results[i][8]=order.getWriter();
results[i][9]=order.getTraslator();
results[i][10]=order.getPublisher();
results[i][11]=order.getDate();
results[i][12]=order.getPrice();
}
return results;
}
/**
* Create the frame
*/
public newBookCheckIFrame() {
super();
setClosable(true);
setIconifiable(true);
setAutoscrolls(true);
setTitle("图书验收");
setBounds(100, 100, 700, 420);
final JPanel panel = new JPanel();
getContentPane().add(panel);
final JScrollPane scrollPane = new JScrollPane();
scrollPane.setPreferredSize(new Dimension(680, 180));
panel.add(scrollPane);
final DefaultTableModel model=new DefaultTableModel();
Object[][] results=getFileStates(Dao.selectBookOrder());
model.setDataVector(results,columnNames);
table = new JTable();
table.setModel(model);
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);//关闭列自动变小
scrollPane.setViewportView(table);
table.addMouseListener(new TableListener());
final JPanel panel_1_1 = new JPanel();
final GridLayout gridLayout = new GridLayout(0, 4);
gridLayout.setVgap(5);
panel_1_1.setLayout(gridLayout);
panel_1_1.setPreferredSize(new Dimension(450, 150));
panel.add(panel_1_1);
final JLabel label_1 = new JLabel();
label_1.setText("订购日期:");
panel_1_1.add(label_1);
SimpleDateFormat myfmt=new SimpleDateFormat("yyyy-MM-dd");
orderDate = new JFormattedTextField(myfmt.getDateInstance());
orderDate.setValue(new java.util.Date());
orderDate.addKeyListener(new DateListener());
panel_1_1.add(orderDate);
final JLabel label_3 = new JLabel();
label_3.setText("书籍编号:");
panel_1_1.add(label_3);
ISBN = new JTextField();
panel_1_1.add(ISBN);
final JLabel label_4 = new JLabel();
label_4.setText("订购数量:");
panel_1_1.add(label_4);
orderNumber = new JTextField();
panel_1_1.add(orderNumber);
final JLabel label_5 = new JLabel();
label_5.setText("操作员:");
panel_1_1.add(label_5);
operator = new JTextField(user.getName());
panel_1_1.add(operator);
final JLabel label_6 = new JLabel();
label_6.setText("图书类别:");
panel_1_1.add(label_6);
bookType = new JTextField();
panel_1_1.add(bookType);
final JLabel label_7 = new JLabel();
label_7.setText("图书原价格:");
panel_1_1.add(label_7);
price = new JTextField();
panel_1_1.add(price);
final JLabel label_9 = new JLabel();
label_9.setText("是否验收:");
panel_1_1.add(label_9);
final JPanel panel_1 = new JPanel();
panel_1_1.add(panel_1);
radioButton1 = new JRadioButton();
radioButton1.setSelected(true);
panel_1.add(radioButton1);
buttonGroup.add(radioButton1);
radioButton1.setText("是");
radioButton2= new JRadioButton();
panel_1.add(radioButton2);
buttonGroup.add(radioButton2);
radioButton2.setText("否");
final JLabel label = new JLabel();
label.setText("折扣:");
panel_1_1.add(label);
zk = new JTextField();
panel_1_1.add(zk);
final JLabel label_2 = new JLabel();
label_2.setText("订购价格:");
panel_1_1.add(label_2);
orderPrice = new JTextField();
panel_1_1.add(orderPrice);
setVisible(true);
final JPanel panel_2 = new JPanel();
getContentPane().add(panel_2, BorderLayout.SOUTH);
final JButton buttonCheck = new JButton();
panel_2.add(buttonCheck);
buttonCheck.setText("验收");
buttonCheck.addActionListener(new CheckActionListener(model));
final JButton buttonExit = new JButton();
panel_2.add(buttonExit);
buttonExit.addActionListener(new CloseActionListener());
buttonExit.setText("退出");
//
}
class DateListener extends KeyAdapter {
public void keyTyped(KeyEvent e) {
if(orderDate.getText().isEmpty()){
JOptionPane.showMessageDialog(null, "时间格式请使用\"2007-05-10\"格式");
}
}
}
class TableListener extends MouseAdapter {
public void mouseClicked(final MouseEvent e) {
int selRow = table.getSelectedRow();
ISBN.setText(table.getValueAt(selRow, 0).toString().trim());
orderDate.setText(table.getValueAt(selRow, 1).toString().trim());
orderNumber.setText(table.getValueAt(selRow, 2).toString().trim());
operator.setText(table.getValueAt(selRow, 3).toString().trim());
bookType.setText(table.getValueAt(selRow, 6).toString().trim());
price.setText(table.getValueAt(selRow, 12).toString().trim());
if(table.getValueAt(selRow, 4).toString().trim().equals("否"))//1代表没有验收
radioButton2.setSelected(true);
else
radioButton1.setSelected(true);
zk.setText(table.getValueAt(selRow, 5).toString().trim());
orderPrice.setText(Double.valueOf(table.getValueAt(selRow, 12).toString().trim())*Double.valueOf(table.getValueAt(selRow, 5).toString().trim())+"");
}
}
class CloseActionListener implements ActionListener { // 添加关闭按钮的事件监听器
public void actionPerformed(final ActionEvent e) {
doDefaultCloseAction();
}
}
class CheckActionListener implements ActionListener{
private final DefaultTableModel model;
CheckActionListener(DefaultTableModel model) {
this.model = model;
}
public void actionPerformed(final ActionEvent e) {
if(radioButton2.isSelected()){
String ISBNs=ISBN.getText();
int i=Dao.UpdateCheckBookOrder(ISBNs);
if(i==1){
JOptionPane.showMessageDialog(null, "验收成功!");
Object[][] results=getFileStates(Dao.selectBookOrder());
model.setDataVector(results,columnNames);
table.setModel(model);
radioButton1.setSelected(true);
}
}
else {
JOptionPane.showMessageDialog(null, "您选择的图书已经进行过验收,请选择其他图书进行验收");
}
}
}
}
6.系统维护页面
源码链接
链接: https://download.csdn.net/download/qq_39556704/12530905.