In the Java Desktop Application template used by Netbeans, a menu bar is created with JMenuBar and JMenuItems.
How can I get that bar displayed at the top, where menu bars are displayed in MacOSX instead of in-window, like in Windows?
In the Java Desktop Application template used by Netbeans, a menu bar is created with JMenuBar and JMenuItems.
How can I get that bar displayed at the top, where menu bars are displayed in MacOSX instead of in-window, like in Windows?
By adding something like this into your code:
if (System.getProperty("os.name").contains("Mac")) {
System.setProperty("apple.laf.useScreenMenuBar", "true");
}
Java applications look like traditional java applications even under OS X.
If you want a native look and feel, there are a few tweaks you have to do. This article series describe them.
http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac/
This includes setting the Dock icon and text, and integrating with the Applications menu.
I believe that the OS X "wrap jar as an application" utility with XCode sets all these properties automatically.