简体   繁体   English

将菜单栏添加到 JFrame 时遇到问题

[英]Trouble with adding menu bar to JFrame

I have trouble with adding a menu bar to my layout using Java Swing.我在使用 Java Swing 将菜单栏添加到我的布局时遇到了麻烦。 Each time a drag the menu bar from the Swing menus I receive this message (See link).每次从 Swing 菜单中拖动菜单栏时,我都会收到此消息(请参阅链接)。 I've tried adding a panel and changing to boarder layout, even updated my JDK.我尝试添加一个面板并更改为边界布局,甚至更新了我的 JDK。 This is the first component I'm trying to add to my layout.这是我尝试添加到布局中的第一个组件。 Can't really understand what's wrong.无法真正理解出了什么问题。 Any ideas?有任何想法吗? screenshot here截图在这里

Try changing the Look and Feel of Netbeans itself.尝试更改 Netbeans 本身的外观。

  1. Click Tools单击工具
  2. Options选项
  3. Appearance外貌
  4. Look and Feel外观和感觉
  5. Nimbus or Metal (or anything else probably). Nimbus 或 Metal(或其他任何可能的东西)。

To me it seems that the Apple LAF isn't compatible...对我来说,Apple LAF 似乎不兼容......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM