package SystemGui;
import DataBase.DataBaseOperate;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.function.ObjIntConsumer;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.table.DefaultTableModel;
public class AdminGui extends JFrame {
private DataBaseOperate operateTest = new DataBaseOperate();
private JPanel contentPane;
private JTextField searchUserTextField;
private JTextField IDTextField;
private JTextField bookInformationTextField;
private JTextField bookNumberTextField;
private JTextField competenceIDField;
JPanel competencePanel = new JPanel();
JPanel bookBorrowPanel = new JPanel();
JPanel userBorrowPanel = new JPanel();
JPanel informationPanel = new JPanel();
JPanel bookInformationPanel = new JPanel();
private Object[][] userInformation;
private Object[][] userBorrow;
private Object[][] bookInformation;
private Object[][] bookBorrow;
private Object[][] competence;
private int borrowNumber;
private int bookNumber;
private int userID;
public JPanel imgPanel = new JPanel();
/**
* Launch the application.
*/
/**
* Create the frame.
*/
public AdminGui() {
setTitle("图书管理系统管理员界面");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 771, 483);
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
JMenu userInformationMenu = new JMenu("用户信息管理");
menuBar.add(userInformationMenu);
JMenuItem informationMenuItem = new JMenuItem("个人信息管理");
userInformationMenu.add(informationMenuItem);
informationMenuItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
imgPanel.setVisible(false);
bookInformationPanel.setVisible(false);
bookBorrowPanel.setVisible(false);
informationPanel.setVisible(true);
userBorrowPanel.setVisible(false);
competencePanel.setVisible(false);
}
});
JMenuItem userBorrowMenuItem = new JMenuItem("用户借阅记录管理");
userInformationMenu.add(userBorrowMenuItem);
userBorrowMenuItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
imgPanel.setVisible(false);
bookInformationPanel.setVisible(false);
bookBorrowPanel.setVisible(false);
informationPanel.setVisible(false);
userBorrowPanel.setVisible(true);
competencePanel.setVisible(false);
}
});
JMenu bookInformationMenu = new JMenu("图书信息管理");
menuBar.add(bookInformationMenu);
JMenuItem bookInformationMenuItem = new JMenuItem("图书信息管理");
bookInformationMenu.add(bookInformationMenuItem);
bookInformationMenuItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
imgPanel.setVisible(false);
bookInformationPanel.setVisible(true);
bookBorrowPanel.setVisible(false);
informationPanel.setVisible(false);
userBorrowPanel.setVisible(false);
competencePanel.setVisible(false);
}
});
JMenuItem bookBorrowMenuItem = new JMenuItem("图书借阅记录管理");
bookInformationMenu.add(bookBorrowMenuItem);
bookBorrowMenuItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
imgPanel.setVisible(false);
bookInformationPanel.setVisible(false);
bookBorrowPanel.setVisible(true);
informationPanel.setVisible(false);
userBorrowPanel.setVisible(false);
competencePanel.setVisible(false);
}
});
JMenu competenceMenu = new JMenu("角色权限管理");
menuBar.add(competenceMenu);
JMenuItem compentenceMenuItem = new JMenuItem("角色权限管理");
competenceMenu.add(compentenceMenuItem);
compentenceMenuItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
imgPanel.setVisible(false);
bookInformationPanel.setVisible(false);
bookBorrowPanel.setVisible(false);
informationPanel.setVisible(false);
userBorrowPanel.setVisible(false);
competencePanel.setVisible(true);
}
});
JMenu aboutMenu = new JMenu("关于");
menuBar.add(aboutMenu);
JMenuItem exitMenuItem = new JMenuItem("安全退出");
aboutMenu.add(exitMenuItem);
exitMenuItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dispose();
Login gui = new Login();
gui.setVisible(true);
}
});
JMenuItem authorMenuItem = new JMenuItem("关于作者");
aboutMenu.add(authorMenuItem);
authorMenuItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(null,"作者\n姓名:赵宏鹏\n班级:计科1403\n学号:1030414313","作者",JOptionPane.INFORMATION_MESSAGE);
}
});
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
imgPanel.setBounds(0, 0, 745, 413);
imgPanel.setLayout(null);
contentPane.add(imgPanel);
imgPanel.setVisible(true);
JLabel imgLabel = new JLabel(new ImageIcon("src/2.jpg"));
imgLabel.setVisible(true);
imgPanel.add(imgLabel);
imgLabel.setBounds(0,0,755,493);
setBookInformationPanel();
setBookBorrowPanel();
setInformationPanel();
setUserBorrowPanel();
setCompetencePanel();
bookInformationPanel.setVisible(false);
bookBorrowPanel.setVisible(false);
informationPanel.setVisible(false);
userBorrowPanel.setVisible(false);
competencePanel.setVisible(false);
}
public void setInformationPanel(){
informationPanel.setBounds(0, 0, 745, 413);
contentPane.add(informationPanel);
informationPanel.setLayout(null);
JComboBox searchUserComboBox = new JComboBox();
searchUserComboBox.setModel(new DefaultComboBoxModel(new String[] {"用户ID", "用户名称", "证件号码"}));
searchUserComboBox.setSelectedIndex(0);
searchUserComboBox.setBounds(95, 10, 83, 21);
informationPanel.add(searchUserComboBox);
searchUserTextField = new JTextField();
searchUserTextField.setBounds(177, 10, 366, 21);
informationPanel.add(searchUserTextField);
searchUserTextField.setColumns(10);
JButton searchUserButton = new JButton("搜索");
searchUserButton.setBounds(549, 8, 93, 23);
searchUserTextField.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
searchUserButton.doClick();
}
});
JButton freshUserButton = new JButton("刷新");
freshUserButton.setBounds(649, 8, 93, 23);
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【资源说明】 1、该资源包括项目的全部源码,下载可以直接使用! 2、本项目适合作为计算机、数学、电子信息等专业的课程设计、期末大作业和毕设项目,作为参考资料学习借鉴。 3、本资源作为“参考资料”如果需要实现其他功能,需要能看懂代码,并且热爱钻研,自行调试。 基于Java的图书管理系统源码.zip
资源推荐
资源详情
资源评论
收起资源包目录
基于Java的图书管理系统源码.zip (127个子文件)
AdminGui.class 25KB
ReaderGui.class 20KB
DataBaseOperate.class 19KB
GridLayoutManager.class 18KB
GridConstraints.class 8KB
ChangeReaderInformation.class 7KB
ChangeAdminInformation.class 7KB
ChangeBookGui.class 6KB
DimensionInfo.class 6KB
SignUp.class 5KB
AddBookGui.class 5KB
ReaderGui$13.class 5KB
AbstractLayout.class 5KB
ReaderGui$11.class 5KB
AdminGui$25.class 4KB
ChangeBorrowGui.class 4KB
InsertBookIntoDataBase.class 4KB
SignUp$1.class 4KB
AddBorrowGui.class 4KB
ChangeReaderInformation$1.class 3KB
Util.class 3KB
ChangeAdminInformation$1.class 3KB
Login.class 3KB
ReaderGui$9.class 3KB
BarCode.class 3KB
LoginFrame.class 3KB
DataBaseLink.class 3KB
AddBookGui$1.class 3KB
ChangeBookGui$1.class 2KB
ChangePasswardGui.class 2KB
HorizontalInfo.class 2KB
LayoutState.class 2KB
VerticalInfo.class 2KB
SupportCode.class 2KB
Login$2.class 2KB
ChangeBorrowGui$1.class 2KB
AddBorrowGui$1.class 2KB
ReaderGui$14.class 2KB
AdminGui$24.class 2KB
AdminGui$12.class 2KB
internetGui.class 2KB
ChangePasswardGui$1.class 2KB
SupportCode$TextWithMnemonic.class 2KB
ReaderGui$6.class 2KB
ReaderGui$12.class 1KB
AdminGui$15.class 1KB
AdminGui$37.class 1KB
AdminGui$28.class 1KB
internetGui$1.class 1KB
AdminGui$19.class 1KB
AdminGui$32.class 1KB
AdminGui$31.class 1KB
AdminGui$18.class 1KB
AdminGui$35.class 1KB
AdminGui$36.class 1KB
AdminGui$10.class 1004B
AdminGui$38.class 1002B
AdminGui$17.class 1002B
AdminGui$30.class 1002B
ReaderGui$7.class 991B
ReaderGui$5.class 979B
ReaderGui$4.class 979B
AdminGui$4.class 972B
AdminGui$1.class 972B
AdminGui$2.class 972B
AdminGui$3.class 972B
AdminGui$5.class 972B
AdminGui$11.class 952B
AdminGui$23.class 938B
ChangeReaderInformation$2.class 938B
ReaderGui$3.class 936B
Login$4.class 890B
ReaderGui$8.class 890B
ReaderGui$2.class 874B
AdminGui$22.class 871B
AdminGui$29.class 870B
AdminGui$16.class 870B
AdminGui$7.class 856B
AdminGui$34.class 819B
AdminGui$27.class 819B
AdminGui$33.class 819B
AdminGui$26.class 819B
AdminGui$20.class 818B
AdminGui$21.class 818B
ReaderGui$10.class 815B
AdminGui$9.class 812B
AdminGui$8.class 812B
AdminGui$14.class 809B
AdminGui$13.class 809B
ReaderGui$1.class 800B
AdminGui$6.class 782B
ChangeAdminInformation$2.class 765B
Login$3.class 762B
ChangePasswardGui$2.class 735B
ChangeBorrowGui$2.class 723B
Login$1.class 715B
ChangeBookGui$2.class 711B
AddBorrowGui$2.class 693B
AddBookGui$2.class 681B
SignUp$2.class 657B
共 127 条
- 1
- 2
资源评论
土豆片片
- 粉丝: 1829
- 资源: 5647
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 获取CPU的序列号的Python脚本
- 4354图446546546546546
- 邮箱管理技巧:减少垃圾邮件的9项实用措施
- 三汇SMG 系列D 型模拟网关用户手册,用于三汇SMG系列网关配置
- Siemens Automation Framework V1.2
- 单个IO口检测多个按键
- 汇川EASY32x固件6.3.0.0
- 高分成品毕业设计《基于SSM(Spring、Spring MVC、MyBatis)+MySQL开发个人财务管理系统》+源码+论文+说明文档+数据库
- 高分成品毕业设计《基于SSM(Spring、Spring MVC、MyBatis)+MySQL开发B2C电子商务平台》+源码+论文+说明文档+数据库
- HKJC_3in1_TR_PROD_L3.0R1An_Build10229.apk
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功