- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
毕业设计__计算机外文翻译 -菜单和工具栏
中文1972字
毕业设计(论文)文献翻译
题 目
学生姓名 学 号
专业名称 计算机科学与技术 年 级 2009级
指导教师 职 称 讲 师
所 在 系(院) 计算机科学与技术
2013 年 3 月 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 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 (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 integer 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 menu is up to the LF. 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, you can use thesetJMenuBar( ) method of JFrame, JDialog, JApplet, or JInternalFrame:
JFrame frame = new JFrame(Menu);
JMenuBar menuBar = new JMenuBar( );
// Attach the menu bar to the frame.
frame.setJMenuBar(menuBar);
The setJMenuBar( ) method is analogous to thesetMenuBar( ) method ofjava.awt.Frame. Like its predecessor, setJMenuBar( ) allows the LF to determine the location of the menu (typically, it anchors the menu bar to the top of a frame, adjusting the frame
您可能关注的文档
- 毕业设计__软件开发设计外文翻译 -软件开发概念和设计方法.doc
- 毕业论文__现浇混凝土楼板裂缝的原因和防治论文.doc
- 可研报告__浅析我国的探望权制度改革的可行性方案.doc
- 项目书__天津宁河1亿只肉鸡养殖项目方案.doc
- 毕业设计__包装材料-外文翻译.doc
- 毕业设计__外文翻译-__对印度人力资源会计的研究.doc
- 毕业设计__金融学专业外文翻译 ---股市严重性讨论_股权市场现象_政府政策与金融全球化.doc
- 毕业设计__网络工程__外文翻译 -什么叫光纤与光纤应用领域.doc
- 项目书__烟花爆竹储存仓库项目实施报告.doc
- 毕业论文__构建我国行政公益诉讼制度的思考.doc
- 毕业论文__著作权扩张及其缘由透视论文.doc
- 毕业论文__河南省永城市农村中小学开设体育课运动项目的分析设计(论文)开题报告(例1).doc
- 毕业论文__论中小型企业如何提高竞争力.doc
- 可研报告__年处理10万吨废机油技术改造可行性研究报告.doc
- 项目书__西安电子科技大学科技实验楼工程项目.doc
- 毕业设计__外文翻译 -商品混凝土质量控制.doc
- 毕业论文__数控车床的改造 数控论文.doc
- 毕业设计__外文翻译-__最小化传感级别不确定性联合策略的机械手控制.doc
- 可研报告__河堤浆砌石护砌工程可行性申请报告.doc
- 可研报告__大兴安岭寒带生物规模化出口加工基地建设农轻纺产品贸易促进资金项目立项申请书.doc
最近下载
- 4.3免疫失调课件(共36张PPT)高中生物学 人教版(2019)选择性必修一.pptx VIP
- 新解读《JB_T 8446 - 2013隐极式同步发电机转子匝间短路测定方法》最新解读.docx VIP
- 一种基于伯努利吸附原理的爬壁检测机器人.pdf VIP
- ZEEKR知识自测及参考答案.docx VIP
- 徐宁金枪手人物介绍水浒传.pptx VIP
- 2025年CSP-S初赛真题(文末附答案).pdf VIP
- 江苏开放大学设计思维与创意设计创意元素训练.doc VIP
- (2024新版本)人教版七年级上册生物全册教案.doc
- 自考劳动和社会保障法历年真题.pdf VIP
- 制冷用水平管降膜蒸发器管束换热优化研究.pdf VIP
文档评论(0)