Question

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 Macs 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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top