开发者

JDialogs cause my application's menus to disappear on OSX

开发者 https://www.devze.com 2022-12-14 09:49 出处:网络
Whenever any of my JDialogs have focus the toolbar does not display any menus accept for my applications main menu (it doesn\'t show file edit etc....).Is this an issue inherent to JDialogs/Swing or i

Whenever any of my JDialogs have focus the toolbar does not display any menus accept for my applications main menu (it doesn't show file edit etc....). Is this an issue inherent to JDialogs/Swing or is this some sort of problem w开发者_高级运维ith how I made my dialogs?


Swing can optionally use the JMenuBar from your application's JFrame and display it along the top of the screen. Set the following property to enable that feature.

System.setProperty("apple.laf.useScreenMenuBar", "true");

Unfortunately, this does not work with JDialog, only JFrame.

0

精彩评论

暂无评论...
验证码 换一张
取 消