How Do I Make My Java Application a Better
Mac OS X Citizen
Macintosh users expect their applications
to behave in a certain way. For example, Mac users are accustomed
to having an application’s menu bar at the top of their screen,
not embedded within each window. Jar Bundler (and other developer
tools) help you make your Java applications act like native Mac
OS X applications. When possible, you should take advantage of them
to provide end-users the experience they expect from a Mac OS X application.
The following list describes steps you can take to tailor a Java
application to Mac OS X so that it provides users with a familiar
interface.- Give
your application a custom icon that replaces the generic icon that
Mac OS X gives all Java applications. In the Build Information pane,
click Choose Icon. An Open dialog appears, letting you choose an
icon (.icns) file. To convert an existing
icon to the correct format, use IconComposer, which is included
with the Developer Tools package.
- Have the application menu bar appear at the top of the screen.
On other operating systems, the menu bar is usually at the top of
the application window, which differs from Mac OS X. To have your
menu bar appear at the top of the screen, select Use MacOS Menu
Bar in the Build Information pane. This just sets the com.apple.macos.useScreenMenuBar Java
property.
- Set the “About” menu item under the application menu.
To set the text to display in this menu item, enter it in the About
Menu Name text field in the Properties pane.
- Set the application’s version information, which is displayed
in the Finder’s preview panes and Get Info windows. To set the
version that’s displayed in the Finder’s column view, enter
it in the Short Version text field in the Properties pane. To set
the version that’s displayed in the Get Info window, enter it
in the the Get-Info String text field in the same pane.