My program consists of one JFrame and two JDialogs. I want the JMenuBar to be shown always when any of these Windows is focused. But I also want to use the 开发者_如何学GoMacs native MenuBar. The problem is, that the following command only puts the JFrames menubar on top of the screen.
System.setProperty ("apple.laf.useScreenMenuBar","true");
The other two menu bars stay where they are. When now one of the two JDialogs is focused, the JMenuBar on top of the screen loses my custom JMenuBar.
Is there any way to always show my custom JMenuBar on top of the screen?
Did you set your JDialog's parent object to be the main frame? You shouldn't have to do anything special for the apple menu bar to appear when a jdialog is showing
精彩评论