up previous next contents
Up: java-on-mac Previous: List of Figures Next: Running the native system   Contents


In this tutorial I'll demonstrate the steps you need to take to make your Java/Swing application look and behave as much like a native Mac OS X application as you possibly can, without getting into native Mac OS X (Cocoa) code.

In this tutorial I'll show how to modify portions of your Java/Swing application to look more like a native Mac application, including:

  1. Running with the system look and feel.
  2. How to identify that your Java application is running on a Mac OS X system.
  3. Putting your JMenuBar on the Mac menu bar.
  4. Putting your application name on the Mac menu bar.
  5. How to respond to the standard About, Preferences, and Quit menu items.
  6. How to convert your [Control] keystrokes to be [Command] keystrokes.
  7. Discuss what to do about having different menus on the Mac and Windows platforms.
  8. What to do about a potpourri of other possible issues.

Throughout this tutorial I'll be showing source code and screenshots from a Java/Swing application I'm creating and running on Mac OS X that I've named "WikiTeX". This is a Swing-based text editor that provides support for a syntax that is part "wiki" and part "LaTeX", hence the name.

As a final introductory note, I'm writing this tutorial and testing my code on a MacBook Pro running Mac OS X 10.4.10, with a JVM version of 1.5.0_07.