Welcome![Sign In][Sign Up]
Location:
Search - Java swing f

Search list

[SDK图书管理系统

Description: 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); } 图书管理系统
Platform: | Size: 560040 | Author: pangshu1221 | Hits:

[JSP/JavaFTPClient

Description: 使用java swing 组件开发的FTP客户端程序,使用了开源EnterpriseDT开发的Java FTP Client Library,绝对好用!-Java swing components developed using FTP client program, using the open source EnterpriseDT development of Java FTP Client Library, is absolutely easy to use!
Platform: | Size: 375808 | Author: Taylor | Hits:

[JSP/JavaJavaPXML-RSS

Description: 一、使用说明 程序入口命令 cd F:\java\2003012142 set classpath=classes javac -d classes src/RssParser.java java RssParser 操作 互动部分在左侧的树 左键选择---状态栏显示RSS的URL 右键弹出---该对象的方法 二、功能 简单快速查看网上的RSS资源,支持RSS2.0版本。 可以添加、删除RSS,可以所有频道一起更新。 三、特点 涉及:异常处理、Swing图形界面、多线程、本地IO操作、网络编程、XMLDOM操作 四、有待改进 支持RSS1.0等版本、支持Atom版本。 UI进阶:HTML解析查看摘要、菜单功能完善。 本地化数据。(支持离线浏览-One, the use of program entry command cd F: \ java \ 2003012142 set classpath = classes javac-d classes src/RssParser.java java RssParser interactive part of the operation left the tree in the left column shows the status of selected--- Right RSS-URL pop-up--- the object of the method two, features a simple RSS quickly view online resources to support RSS2.0 version. You can add, delete, RSS, updates can be together all the channels. Third, the characteristics related to: exception handling, Swing graphical user interface, multithreading, local IO operation, network programming, XMLDOM operating four, room for improvement in support for RSS1.0 other versions, supports Atom version. Advanced UI: HTML parsing View Summary, the menu featured. Localization data. (Supports offline browsing
Platform: | Size: 198656 | Author: jeffreylzq | Hits:

[JSP/JavaChatRoom

Description: 实现了java环境下一对一的私人聊天功能-import java.io.* import java.awt.* import java.awt.event.* import javax.swing.* import java.net.* public class ChatClient implements ActionListener { private Panel panel private JTextArea said private JTextField chat private JButton send private ServerSocket server private Socket s private InputStream in private OutputStream out public ChatClient() { JFrame f=new JFrame("聊天系统客户机端") f.setSize(350,400) panel=new Panel() said=new JTextArea() chat=new JTextField(20) chat.addActionListener(this) send=new JButton("发送") send.addActionListener(this) panel.add(chat) panel.add(send) f.add("South",panel) f.add("Center",said) f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0) } }) f.show() } public void startN
Platform: | Size: 6144 | Author: gddjq | Hits:

[JSP/JavaJiSuanQi

Description: java实现计算器,import java.awt.* import java.awt.event.* import javax.swing.* public class JiSuanQi { Frame f Label lab Button[] bt=new Button[29] JTextField t StringBuffer str //显示屏所显示的字符串 double x,y //x和y都是运算数 int z //Z表示单击了那一个运算符.0表示"+",1表示"-",2表示"*",3表示"/" static double m //记忆的数字 JiSuanQi() {-java implementation calculator, import java.awt.* import java.awt.event.* import javax.swing.* public class JiSuanQi {Frame f Label lab Button [] bt = new Button [29] JTextField t StringBuffer str //display character string displayed double x, y //x and y are the operands int z //Z represents an operator clicks that 0 means " +" , 1 indicates " -" , 2 is " *" , 3 is " /" static double m //number in memory JiSuanQi () {
Platform: | Size: 2048 | Author: 郭涛涛 | Hits:

[Education soft systemlibrary

Description: 图书管理系统,采用java Swing和文件操作编写,使用时文件默认存储在F盘-Library management system, using java Swing and write file operations, file by default when using the F disk storage
Platform: | Size: 20480 | Author: 胡逸芃 | Hits:

CodeBus www.codebus.net