Anonymous181
Anonymous181

Reputation: 1873

Putting JMenu on the Mac menu bar

I'm creating an java application on a Mac that uses Swing JMenus. I would like to use the menu bar on the top of the screen, but it keeps on putting the menu bar in the frame itself. How do you move the menu bar to the top of the screen on a Mac?

Upvotes: 3

Views: 4243

Answers (1)

cello
cello

Reputation: 5486

You can set a System property to do so. The first example on http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_PropertiesRef/Articles/JavaSystemProperties.html mentions to use System.setProperty("apple.laf.useScreenMenuBar", "true"); to put your menu into the menubar.

Upvotes: 13

Related Questions