计算机外文翻译--菜单和工具栏
《计算机外文翻译--菜单和工具栏》由会员分享,可在线阅读,更多相关《计算机外文翻译--菜单和工具栏(10页珍藏版)》请在毕设资料网上搜索。
1、 中文 1972 字 毕业设计(论文)文献翻译 题 目 学生姓名 学 号 专业名称 计算机科学与技术 年 级 2009 级 指导教师 职 称 讲 师 所 在 系(院) 计算机科学与技术 2013 年 3 月 1 日 1 Menus and Toolbars Excerpted from Java Swing(2Nd Edition)(OReilly)by Marc Loy,Robert Eckstein etc. The JMenuBar Class SwingsJMenuBar class supersedes the AWTMenuBar class. This class creates
2、 a horizontal menu bar component with zero or more menus attached to it. JMenuBar uses theDefaultSingleSelectionModel as its data model because the user can raise, or activate , only one of its menus at a given time. Once the mouse pointer leaves that menu, the class removes the menu from the screen
3、 (or cancels it, in Swing lingo), and all menus again become eligible to be raised Figure 14-4 shows the class hierarchy for the JMenuBar component. Figure 14-4. JMenuBar class diagram You can add JMenu objects to the menu bar with theadd( ) method of theJMenuBar class. JMenuBar then assigns an inte
4、ger index based on the order in which the menus were added. The menu bar displays the menus from left to right on the bar according to their assigned index. In theory, there is one exception: the help menu. You are supposed to be allowed to mark one menu as the help menu; the location of the help me
5、nu is up to the L&F. In practice, trying to do this results in JMenuBar throwing an Error. Menu Bar Placement You can attach menu bars to Swing frames or applets in one of two ways. First, 2 you can use thesetJMenuBar( ) method of JFrame, JDialog, JApplet, or JInternalFrame: JFrame frame = new JFram
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中设计图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 计算机 外文 翻译 菜单 以及 工具栏
