Putting JMenu in the Mac menu bar

I am creating a Java application on a Mac that uses Swing JMenus. I would like to use the menu bar at the top of the screen, but it continues to put the menu bar in the frame itself. How to move the menu bar to the top of the screen on a Mac?

+3
source share
1 answer

You can set the System property for this. The first example http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_PropertiesRef/Articles/JavaSystemProperties.html mentions using System.setProperty("apple.laf.useScreenMenuBar", "true");to place your menu in the menu bar.

+11
source

All Articles