欢迎来到毕设资料网! | 帮助中心 毕设资料交流与分享平台
毕设资料网
全部分类
  • 毕业设计>
  • 毕业论文>
  • 外文翻译>
  • 课程设计>
  • 实习报告>
  • 相关资料>
  • ImageVerifierCode 换一换
    首页 毕设资料网 > 资源分类 > DOC文档下载
    分享到微信 分享到微博 分享到QQ空间

    计算机外文翻译--菜单和工具栏

    • 资源ID:137181       资源大小:82KB        全文页数:10页
    • 资源格式: DOC        下载积分:100金币
    快捷下载 游客一键下载
    账号登录下载
    三方登录下载: QQ登录
    下载资源需要100金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。

    计算机外文翻译--菜单和工具栏

    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

    6、e(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 L&F to determine the location of the menu (typically, it an

    7、chors the menu bar to the top of a frame, adjusting the frames internal Insets accordingly). Both JApplet and JDialog contain a setJMenuBar( ) method this means that you can add menu bars to both applets and dialogs. Either way, be sure not to confuse the setJMenuBar( ) method with the older setMenu

    8、Bar( ) method of AWT when working with Swing menus, or the compiler complains bitterly. If your application is running on a Macintosh, the Mac L&F can be configured to place menu bars at the top of the screen, where Mac users expect to find them. Setting the system property com.apple.macos.useScreen

    9、MenuBar to true activates thisbehavior. Its disabled by default because most Java programs do not expect this behavior, and they must be coded properly to deal with it. Notably, the Aqua Human Interface Guidelines require that the menu bar is always visible. If your application has any frames that l

    10、ack menu bars, whenever one of these gains focus, it causes the menu bar to disappear, much to the users consternation. The most common way of dealing with this is to write a menu factory that generates an identical menu bar for each frame your application uses. Although this is a little extra work,

    11、 the familiarity and comfort it brings your Mac users is probably worth it. The second way to add a menu bar is much less common. Recall that the JMenuBar class extendsJComponent. This means it can be positioned by a Swing layout manager like other Swing components. For example, we could replace the call


    注意事项

    本文(计算机外文翻译--菜单和工具栏)为本站会员(译***)主动上传,毕设资料网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请联系网站客服QQ:540560583,我们立即给予删除!




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们
    本站所有资料均属于原创者所有,仅提供参考和学习交流之用,请勿用做其他用途,转载必究!如有侵犯您的权利请联系本站,一经查实我们会立即删除相关内容!
    copyright@ 2008-2025 毕设资料网所有
    联系QQ:540560583