Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Programming Businesses Apple IT Technology

Tuning Java Swing apps for Mac OS X 37

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."
This discussion has been archived. No new comments can be posted.

Tuning Java Swing apps for Mac OS X

Comments Filter:
  • Not bad... (Score:4, Informative)

    by NetRanger ( 5584 ) on Wednesday October 09, 2002 @02:22PM (#4418135) Homepage
    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? :-)
  • Re:Not bad... (Score:4, Informative)

    by smileyy ( 11535 ) <smileyy@gmail.com> on Wednesday October 09, 2002 @02:46PM (#4418346)
    You mean the different Swing look-and-feels? Already done.
  • Re:SWT? (Score:5, Informative)

    by smileyy ( 11535 ) <smileyy@gmail.com> on Wednesday October 09, 2002 @04:26PM (#4419284)

    This looks like the best introduction:

    http://www.eclipse.org/articles/Article-SWT-Design -1/SWT-Design-1.html [eclipse.org]

  • by anarkhos ( 209172 ) on Wednesday October 09, 2002 @05:59PM (#4420035)
    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.
  • by Anonymous Coward on Wednesday October 09, 2002 @09:26PM (#4421068)

    On the Mac it is ".app" for applications, but the convention is for file name extensions not to be shown in the GUI (you get the type in the GUI from an icon or from a complete description such as "Application").

    Over time, Apple and Sun and others in the Java community will probably come up with ways to make Java apps appear even more native, especially on Mac OS X, since it is so Java-friendly. Also, once you dress up your application in Aqua, it looks really great and it is very, very easy to use. I added a Java app to my creative tools recently (for the first time) and all I had to do to use it was run it. It appears to be just one icon, but if you look inside the "package", there is a Mac icon file in there and a JAR file and a few XML files that tie it all together and provide meta information to the system.

    Here is the app, for those that are interested: MuSing [geneffects.com]. I added pro drum sounds to it and it is really worthy of running next to Logic and Pro Tools and other great Mac audio software.

    There is a great opportunity for Java developers on Mac OS X. You start with your JAR file, and an afternoon later, you have a Mac app. Hire an artist to make an icon for you, or solicit them from your users if you aren't an artist yourself ... you'll get three or four back in a few days and your app will really benefit from a nice icon. That's the user's handle on your app and they appreciate it when some kind of artistic statement is made there that is worthy of the algorithms and whatnot in your application.

    Mac OS X is a great place for Java to shine in the mainstream. I'm looking forward to using more and more Java apps over time, and knowing that I'm doing so less and less.

HELP!!!! I'm being held prisoner in /usr/games/lib!

Working...