Tuning Java Swing apps for Mac OS X
tarkin writes "Sven Van Caekenberghe just finished a tutorial article, 'Tuning Java Swing applications for Mac OS X', that explains how to tune standard Java Swing applications to conform to the Mac OS X User Experience and make them virtually indistinguishable from native Mac OS X applications. Topics include handling basic Apple events, packaging applications, adding a custom icon, file dialogs, about boxes, preferences, customizing the menu bar, supporting Finder drag-and-drop, standard help, and basic multi-document support, as well as using MRJToolkit and MRJAppBuilder. The PDF of the article, as well as a Mac OS X disk image with a binary version of the two demo applications and the source code can downloaded from his home page."
Swing is much easier to create useful applications with; it's good to see that someone is helping go it cross-platform to the Mac, to where it makes sense with the system paradigm. Unfortunately the controls in the standard Swing package look a little too much like Windows 9X.
:-)
Perhaps the next thing we need is skinnable Swing?
-- We live in a world where lemonade is artificial and soap has real lemon.
This looks like the best introduction:
http://www.eclipse.org/articles/Article-SWT-Design -1/SWT-Design-1.html
pooptruck
The best advice I can give Mac OS X users who want to run a Swing app is to change the default L&F to something other than Aqua.
Swing apps are incapable of behaving like Mac apps. Thus using the Aqua theme for Swing apps is the absolute worst possible combination!
One of the key reasons Swing apps will NEVER behave like Mac apps is the Java file primitive. The misnomer File class should really be called FilePath. Since (100% Java) Swing apps use file paths as file primitives this implies that file paths are constant. Thus if you move/rename an open file (or host directory/non-root volume) the Swing app will become confused.
>80 column hard wrapped e-mail is not a sign of intelligent
>life