Placing a Java app Menubar on the OS X menu bar

iluvosx

Registered
Hi folks !!
HELP !! HELP !!
I am completely stumped here. How do we create JMenubar in Swing which would position permanently on the OS X menu bar ? I went through the OS X-Java documentation and found that it does not provide any details on how to go about doing this. Any sample code for this would be a GOD-SEND !!!

Thanks.
 
If you start your app like this it will work.

java -Dcom.apple.macos.useScreenMenuBar=true appname

When making double clickable applications wit MRJAppBuilder you can set this permanently for your app.

You DON'T get a truly global menu bar this way (or any other way I know of) the active window just displays it's menu bar at the right place, so you have to have the same menubar attached to every window.

Some guy at Apple promised to post code for having a global menubar, but still nothing at http://developer.apple.com/samplecode/Sample_Code/Java.htm
 
Back
Top