文件名称:图书管理系统
-
所属分类:
- 标签属性:
- 上传时间:2009-11-19
-
文件大小:546.91kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class BookManageMain{
public void main(String[] args){
Frame f = new Frame("图书管理系统");//super("图书管理系统");
MenuBar Menub = new MenuBar();
//系统管理子菜单
Menu jMenuSystem = new Menu("系统管理");
MenuItem jMenuItemLogin = new MenuItem("用户登录");
Menu jMenuUserManage = new Menu("用户管理");
MenuItem jMenuFileExit = new MenuItem("退出");
MenuItem jMenuItemuseradd = new MenuItem("添加用户");
MenuItem jMenuItemuserupdate = new MenuItem("修改用户");
MenuItem jMenuItemuserdelete = new MenuItem("删除用户");
jMenuItemLogin.addActionListener(this);
jMenuFileExit.addActionListener(this);
jMenuItemuseradd.addActionListener(this);
jMenuItemuserupdate.addActionListener(this);
jMenuItemuserdelete.addActionListener(this);
Menub.add(jMenuSystem);
//书籍管理子菜单
Menu jMenuBookManage = new Menu("书籍管理");
MenuItem jMenuItemBookAdd = new MenuItem("添加书籍信息");
MenuItem jMenuItemBookUpdate = new MenuItem("修改书籍信息");
MenuItem jMenuItemBookDelete = new MenuItem("删除书籍信息");
jMenuItemBookAdd.addActionListener(this);
jMenuItemBookUpdate.addActionListener(this);
jMenuItemBookDelete.addActionListener(this);
Menub.add(jMenuBookManage);
//借书管理子菜单
Menu jMenuBorrowBook = new Menu("借书管理");
MenuItem jMenuItemBookBorrow = new MenuItem("书籍出借");
MenuItem jMenuItemBookBorrowUpdate = new MenuItem("出借信息修改");
jMenuItemBookBorrow.addActionListener(this);
jMenuItemBookBorrowUpdate.addActionListener(this);
Menub.add(jMenuBorrowBook);
//还书管理子菜单
Menu jMenuReturnBook = new Menu("还书管理");
MenuItem jMenuItemBookReturn = new MenuItem("书籍还入");
MenuItem jMenuItemBookReturnUpdate = new MenuItem("书籍还入信息修改");
jMenuItemBookReturn.addActionListener(this);
jMenuItemBookReturnUpdate.addActionListener(this);
Menub.add(jMenuReturnBook);
//信息一览子菜单
Menu jMenuAllInfo = new Menu("信息一览");
MenuItem jMenuItemAllBook = new MenuItem("书籍列表");
MenuItem jMenuItemAllRead = new MenuItem("借阅者列表");
MenuItem jMenuItemAllInfo = new MenuItem("借阅情况列表");
jMenuItemAllBook.addActionListener(this);
jMenuItemAllRead.addActionListener(this);
jMenuItemAllInfo.addActionListener(this);
Menub.add(jMenuAllInfo);
f.setMenuBar(Menub);
Menub.add(jMenuSystem);
Menub.add(jMenuBookManage);
//jMenuSystem.addSeparator();
Menub.add(jMenuBorrowBook);
Menub.add(jMenuReturnBook);
Menub.add(jMenuAllInfo);
jMenuSystem.add(jMenuItemLogin);
jMenuSystem.addSeparator();//分割线
jMenuSystem.add(jMenuUserManage);
jMenuSystem.addSeparator();
jMenuSystem.add(jMenuFileExit);
jMenuUserManage.add(jMenuItemuseradd);
jMenuUserManage.addSeparator();
jMenuUserManage.add(jMenuItemuserupdate);
jMenuUserManage.addSeparator();
jMenuUserManage.add(jMenuItemuserdelete);
jMenuBookManage.add(jMenuItemBookAdd);
jMenuBookManage.addSeparator();
jMenuBookManage.add(jMenuItemBookUpdate);
jMenuBookManage.addSeparator();
jMenuBookManage.add(jMenuItemBookDelete);
jMenuBorrowBook.add(jMenuBookBorrow);
jMenuBorrowBook.addSeparator();
jMenuBorrowBook.add(jMenuBookBorrowUpdate);
jMenuReturnBook.add(jMenuItemBookReturn);
jMenuReturnBook.addSeparator();
jMenuReturnBook.add(jMenuItemBookReturnUpdate);
jMenuAllInfo.add(jMenuItemAllBook);
jMenuAllInfo.addSeparator();
jMenuAllInfo.add(jMenuItemAllRead);
jMenuAllInfo.addSeparator();
jMenuAllInfo.add(jMenuItemAllInfo);
f.setSize(800,600);
//f.setBounds(400,400,600,800);
f.setVisible(true);
f.show();
}
//设置初始状态
/* jMenuUserManage.setEnabled(false);
jMenuBookManage.setEnabled(false);
jMenuBorrowBook.setEnabled(false);
jMenuReturnBook.setEnabled(false);
jMenuAllInfo.setEnabled(false);
*/
}
/* public void this_windowOpened(WindowEvent e){
setEnable("else");
jMenuItemLogin dlg = new jMenuItemLogin(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize=getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}*/
public void actionPerformed(ActionEvent e){
if(e.getActionCommand()= "用户登录")
{jMenuItemLogin dlg = new jMenuItemLogin(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand()="添加用户")
{jMenuItemuseradd dlg= new jMenuItemuseradd();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="修改用户")
{jMenuItemuserupdate dlg = new jMenuItemuserupdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="删除用户")
{
jMenuItemuserdelete dlg = new jMenuItemuserdelete();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();}
else if(e.getActionCommand="添加书籍信息")
{
jMenuItemBookAdd dlg = new jMenuItemBookAdd();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="修改书籍信息")
{
jMenuItemBookUpdate dlg=new jMenuItemBookUpdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="删除书籍信息")
{jMenuItemBookDelete dlg= new jMenuItemBookDelete();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="书籍出借")
{
jMenuItemuBookBorrow dlg = new jMenuItemuBookBorrow();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="出借信息修改")
{jMenuItemuBookBorrowUpdate dlg= new jMenuItemuBookBorrowUpdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="书籍还入")
{
jMenuItemBookReturn dlg=new jMenuItemBookReturn();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommond="书籍还入信息修改")
{
jMenuItemBookReturnUpdate dlg= new jMenuItemBookReturnUpdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommond="书籍列表")
{
jMenuItemAllBook dlg=new jMenuItemAllBook();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommond="借阅者列表")
{
jMenuItemAllRead dlg = new jMenuItemAllRead();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="借阅情况列表")
{
jMenuItemAllInfo dlg = new jMenuItemAllInfo();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="借阅情况列表")
{
AllInfo dlg=new allinfo();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="退出")
{
this.dispose();
System.exit(0);
}
图书管理系统
import javax.swing.*;
import java.awt.event.*;
public class BookManageMain{
public void main(String[] args){
Frame f = new Frame("图书管理系统");//super("图书管理系统");
MenuBar Menub = new MenuBar();
//系统管理子菜单
Menu jMenuSystem = new Menu("系统管理");
MenuItem jMenuItemLogin = new MenuItem("用户登录");
Menu jMenuUserManage = new Menu("用户管理");
MenuItem jMenuFileExit = new MenuItem("退出");
MenuItem jMenuItemuseradd = new MenuItem("添加用户");
MenuItem jMenuItemuserupdate = new MenuItem("修改用户");
MenuItem jMenuItemuserdelete = new MenuItem("删除用户");
jMenuItemLogin.addActionListener(this);
jMenuFileExit.addActionListener(this);
jMenuItemuseradd.addActionListener(this);
jMenuItemuserupdate.addActionListener(this);
jMenuItemuserdelete.addActionListener(this);
Menub.add(jMenuSystem);
//书籍管理子菜单
Menu jMenuBookManage = new Menu("书籍管理");
MenuItem jMenuItemBookAdd = new MenuItem("添加书籍信息");
MenuItem jMenuItemBookUpdate = new MenuItem("修改书籍信息");
MenuItem jMenuItemBookDelete = new MenuItem("删除书籍信息");
jMenuItemBookAdd.addActionListener(this);
jMenuItemBookUpdate.addActionListener(this);
jMenuItemBookDelete.addActionListener(this);
Menub.add(jMenuBookManage);
//借书管理子菜单
Menu jMenuBorrowBook = new Menu("借书管理");
MenuItem jMenuItemBookBorrow = new MenuItem("书籍出借");
MenuItem jMenuItemBookBorrowUpdate = new MenuItem("出借信息修改");
jMenuItemBookBorrow.addActionListener(this);
jMenuItemBookBorrowUpdate.addActionListener(this);
Menub.add(jMenuBorrowBook);
//还书管理子菜单
Menu jMenuReturnBook = new Menu("还书管理");
MenuItem jMenuItemBookReturn = new MenuItem("书籍还入");
MenuItem jMenuItemBookReturnUpdate = new MenuItem("书籍还入信息修改");
jMenuItemBookReturn.addActionListener(this);
jMenuItemBookReturnUpdate.addActionListener(this);
Menub.add(jMenuReturnBook);
//信息一览子菜单
Menu jMenuAllInfo = new Menu("信息一览");
MenuItem jMenuItemAllBook = new MenuItem("书籍列表");
MenuItem jMenuItemAllRead = new MenuItem("借阅者列表");
MenuItem jMenuItemAllInfo = new MenuItem("借阅情况列表");
jMenuItemAllBook.addActionListener(this);
jMenuItemAllRead.addActionListener(this);
jMenuItemAllInfo.addActionListener(this);
Menub.add(jMenuAllInfo);
f.setMenuBar(Menub);
Menub.add(jMenuSystem);
Menub.add(jMenuBookManage);
//jMenuSystem.addSeparator();
Menub.add(jMenuBorrowBook);
Menub.add(jMenuReturnBook);
Menub.add(jMenuAllInfo);
jMenuSystem.add(jMenuItemLogin);
jMenuSystem.addSeparator();//分割线
jMenuSystem.add(jMenuUserManage);
jMenuSystem.addSeparator();
jMenuSystem.add(jMenuFileExit);
jMenuUserManage.add(jMenuItemuseradd);
jMenuUserManage.addSeparator();
jMenuUserManage.add(jMenuItemuserupdate);
jMenuUserManage.addSeparator();
jMenuUserManage.add(jMenuItemuserdelete);
jMenuBookManage.add(jMenuItemBookAdd);
jMenuBookManage.addSeparator();
jMenuBookManage.add(jMenuItemBookUpdate);
jMenuBookManage.addSeparator();
jMenuBookManage.add(jMenuItemBookDelete);
jMenuBorrowBook.add(jMenuBookBorrow);
jMenuBorrowBook.addSeparator();
jMenuBorrowBook.add(jMenuBookBorrowUpdate);
jMenuReturnBook.add(jMenuItemBookReturn);
jMenuReturnBook.addSeparator();
jMenuReturnBook.add(jMenuItemBookReturnUpdate);
jMenuAllInfo.add(jMenuItemAllBook);
jMenuAllInfo.addSeparator();
jMenuAllInfo.add(jMenuItemAllRead);
jMenuAllInfo.addSeparator();
jMenuAllInfo.add(jMenuItemAllInfo);
f.setSize(800,600);
//f.setBounds(400,400,600,800);
f.setVisible(true);
f.show();
}
//设置初始状态
/* jMenuUserManage.setEnabled(false);
jMenuBookManage.setEnabled(false);
jMenuBorrowBook.setEnabled(false);
jMenuReturnBook.setEnabled(false);
jMenuAllInfo.setEnabled(false);
*/
}
/* public void this_windowOpened(WindowEvent e){
setEnable("else");
jMenuItemLogin dlg = new jMenuItemLogin(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize=getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}*/
public void actionPerformed(ActionEvent e){
if(e.getActionCommand()= "用户登录")
{jMenuItemLogin dlg = new jMenuItemLogin(this);
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand()="添加用户")
{jMenuItemuseradd dlg= new jMenuItemuseradd();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="修改用户")
{jMenuItemuserupdate dlg = new jMenuItemuserupdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="删除用户")
{
jMenuItemuserdelete dlg = new jMenuItemuserdelete();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();}
else if(e.getActionCommand="添加书籍信息")
{
jMenuItemBookAdd dlg = new jMenuItemBookAdd();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="修改书籍信息")
{
jMenuItemBookUpdate dlg=new jMenuItemBookUpdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="删除书籍信息")
{jMenuItemBookDelete dlg= new jMenuItemBookDelete();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="书籍出借")
{
jMenuItemuBookBorrow dlg = new jMenuItemuBookBorrow();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="出借信息修改")
{jMenuItemuBookBorrowUpdate dlg= new jMenuItemuBookBorrowUpdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="书籍还入")
{
jMenuItemBookReturn dlg=new jMenuItemBookReturn();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommond="书籍还入信息修改")
{
jMenuItemBookReturnUpdate dlg= new jMenuItemBookReturnUpdate();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommond="书籍列表")
{
jMenuItemAllBook dlg=new jMenuItemAllBook();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommond="借阅者列表")
{
jMenuItemAllRead dlg = new jMenuItemAllRead();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="借阅情况列表")
{
jMenuItemAllInfo dlg = new jMenuItemAllInfo();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="借阅情况列表")
{
AllInfo dlg=new allinfo();
Dimension dlgSize = dlg.getPreferredSize();
Dimension frmSize = getSize();
Point loc = getLocation();
dlg.setLocation((frmSize.width-dlgSize.width)/2+loc.x,(frmSize.height-dlgSize.height)/2+loc.y);
dlg.pack();
dlg.show();
}
else if(e.getActionCommand="退出")
{
this.dispose();
System.exit(0);
}
图书管理系统
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : cvery_334829032.rar 列表 334829032/Data 334829032/MainPro.dpr 334829032/图书借阅管理系统.exe 334829032/下载说明.htm 334829032/Data/1.ICO 334829032/autorun.inf 334829032/Data/lib.mdb 334829032/Book.pas 334829032/Main.pas 334829032/Sys.pas 334829032/系统说明.txt 334829032/Welcome to you.url 334829032
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.