欢迎来到天天文库
浏览记录
ID:12916782
大小:1.89 MB
页数:0页
时间:2018-07-19
《数据库图书管理系统》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、packagecom.wsy;importjava.awt.BorderLayout;importjava.awt.Dimension;//importjava.awt.Dialog.ModalExclusionType;importjava.awt.event.ComponentAdapter;importjava.awt.event.ComponentEvent;importjava.net.URL;importjavax.swing.ImageIcon;importjavax.swing.JButton;importjavax.swing.JDesktopPane;imp
2、ortjavax.swing.JFrame;importjavax.swing.JInternalFrame;importjavax.swing.JLabel;importjavax.swing.JMenu;importjavax.swing.JMenuBar;importjavax.swing.JToolBar;importjavax.swing.UIManager;importjavax.swing.WindowConstants;importjavax.swing.border.BevelBorder;importcom.wsy.iframe.BookLoginIFram
3、e;importcom.wsy.util.CreatecdIcon;publicclassLibraryextendsJFrame{privatestaticfinalJDesktopPaneDESKTOP_PANE=newJDesktopPane();publicstaticvoidmain(String[]args){try{UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());newBookLoginIFrame();//登录窗口}catch(Exceptionex){ex.printSta
4、ckTrace();}}publicstaticvoidaddIFame(JInternalFrameiframe){DESKTOP_PANE.add(iframe);}publicLibrary(){super();setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);//setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);setLocationByPlatform(true);setSize(800,600);setTitle("图书馆管理系统"
5、);JMenuBarmenuBar=createMenu();setJMenuBar(menuBar);JToolBartoolBar=createToolBar();getContentPane().add(toolBar,BorderLayout.NORTH);finalJLabellabel=newJLabel();label.setBounds(0,0,0,0);label.setIcon(null);DESKTOP_PANE.addComponentListener(newComponentAdapter(){publicvoidcomponentResized(fi
6、nalComponentEvente){Dimensionsize=e.getComponent().getSize();label.setSize(e.getComponent().getSize());label.setText("");}});DESKTOP_PANE.add(label,newInteger(Integer.MIN_VALUE));
7、getContentPane().add(DESKTOP_PANE);}privateJToolBarcreateToolBar(){JToolBartoolBar=newJToolBar();toolBar.setFloatable(false);toolBar.setBorder(newBevelBorder(BevelBorder.RAISED));JButtonbookAddButton=newJButton(MenuActions.BOOK_ADD);//ImageIconicon
此文档下载收益归作者所有