The Source for Java Technology Collaboration
User: Password:



Simon Brown

Simon Brown's Blog

Building desktop clients for Mac OS X with Swing

Posted by simongbrown on August 05, 2003 at 01:57 AM | Comments (8)

I'm currently reading (and reviewing for JavaRanch) Mac OS X for Java Geeks by Will Iverson and I'm surprised at how good the integration between the core Java platform and Mac OS X really is. Okay, I knew that Apple ships JDK 1.3 and 1.4 along with OSX, but I never realised that you could build a Java application and package it up to look like a regular native app wihout running your code through some native compiler. Instead, Apple provides a way for you to use the same application packaging mechanism as native applications use - you just bundle up all of your classes and resources into a directory and write an XML file to specify the characteristics of that application, much like a deployment descriptor. Once built, you then have a seemingly normal Mac OS X application. In fact, with a little more work on your part, you can even have integration with the Finder and Dock without leaving the Java environment.

With pluggable "look and feel"s available for Mac OS X and now Windows XP, are we now truly going to start seeing the return of the Java desktop client en-masse? If you had asked me a couple of years ago which Swing L&F I preferred, the answer would have been Metal because it looked consistent on all platforms. Although I do like Metal, I think end-users really deserve to be given an application that integrates seamlessly with their native environment. The hard part, of course, is making your desktop applications look and behave the same on your target platforms. I recently blogged about a framework that I developed in the past and perhaps it really is time to dig this out and take it further. Does anybody know of any existing open source frameworks that help you build cross platform Swing applications?


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Framework
    Simon,

    I've got a framework I've been working on for some time. It's not out yet but it might provide you with a few ideas.

    Also, I don't think the Metal L&F is a bad idea. The myth of the native L&F (that using it will automatically make your program a 100 times more usable) is just a myth. The (real) most popular "desktop applications" in the world are in fact web applications (Amazon, EBay) and each one of those has a completely different L&F. I suspect, and a few experiments back it up, that it's not external consistency that users want (except for Mac users who're wierd) but internal consistency. The real problem with the Metal L&F, I think, is it's color scheme and the difficulty in reading text. To see a really variation on Metal check out IntelliJ IDEA (an app I use everyday). It's replaced the purplish theme with a simple clean blue and grey one and the label/button text a lot more readable (though users can actually customize this).

    Anyways it's good to see others working on this problem.

    Posted by: ocean on August 05, 2003 at 06:39 AM

  • Framework
    I agree. I don't think that the Metal L&F is a bad idea, although after seeing some "pure" Metal applications, I'm always left feeling that I want something richer and it’s always seemed clunkier than the native interface. Granted, it still works the same! I think this is where the Aqua L&F that Apple have provided could really begin to kick-start the whole "Java on the desktop" thing again. The Aqua L&F lets you build apps that look native and this should help people to get over the old myth of “but this is Java and it’s slow” the minute they see a Metal L&F. Incidentally, one of my favourite Swing books is the Java Look and Feel Guidelines.

    Actually, you raise an interesting point with IntelliJ. I also use it everyday and have always left it on the default L&F, partially because changing the L&F doesn’t do much, but also because the Metal L&F works much better on Mac, certainly with IntelliJ 3.0 anyway. It just goes to show that you really do have to work at true cross-platform compatibility.

    Posted by: simongbrown on August 05, 2003 at 07:03 AM

  • Usability AND portability.
    Mac has really delivered a nice package for Java, I'm afraid we won't see similar things on the other platforms. (not any time soon anyway :)

    In our company we develop applications on Linux since we find that more pleasurable to develop on. Naturally our customers (almost 100%) are Windows users. Due to this we made a L&F that looks good and behaves good. Behavior is in things like a JTextField that selects all text when you tab into the field, but not when you select it with the mouse. Any many other small issues.

    As you asked for a 'framework' I can point you to http://uic.sf.net where our L&F and widgetset can be found in Apache licence.

    Don't be immidiately intimidated by the graphical designer issue that we use in the project, even without it the widgets and the look and feel are very usable.
    Take, for example, a look at this:
    http://uic.sourceforge.net/tutorials/configdiag.jnlp

    Posted by: zander on August 05, 2003 at 07:35 AM

  • Framework
    But Amazon and eBay are not desktop applications, so your argument about them having different look-and-feels is immaterial. Follow the recent weblogs here on usability for more information on the difference between desktop applications and web applications, and the limitations on the latter.

    On the Macintosh java-dev mailing list, the issue of Metal vs. Aqua (native) comes up fairly frequently. One list member actually replied that users "expect" Java applications to use the Metal LAF. This notion is ridiculous (and other list members let him know so). Should a user expect a different interface for an application written in each of C, C++, Pascal, etc? Of course not; the end user should not even need to be aware of the language the program is written in to use and run it. And that's the problem with Java applications; the user knows they are Java applications. Swing deserves a lot (though not all) of that blame.

    Posted by: jimothy on August 06, 2003 at 11:09 AM

  • Let me know if you have any Qs...
    Hi Simon - hope you like the book. Feel free to shoot me any questions.... :)

    Posted by: wiverson on August 06, 2003 at 04:51 PM

  • Let me know if you have any Qs...
    I certainly do like it - great work! The review should appear on JavaRanch (and hopefully on my blog) very soon. :-)

    Posted by: simongbrown on August 07, 2003 at 03:36 AM

  • 网络è¥é”€è½¯ä»¶
    网络è¥é”€è½¯ä»¶
    网络è¥é”€è½¯ä»¶
    群å‘软件
    群å‘软件
    ---
    群å‘软件
    网络è¥é”€è½¯ä»¶
    论å›ç¾¤å‘软件
    网站排å软件
    群å‘软件
    推广å°åŠ©æ‰‹ç ´è§£ç‰ˆ
    论å›ç¾¤å‘软件
    网站排å软件
    群å‘软件
    推è给你很好的群å‘软件和信æ¯ç¾¤å‘软件和供求群å‘软件
    推è给你很好的群å‘软件和信æ¯ç¾¤å‘软件和供求群å‘软件åšå®¢ç¾¤å‘软件网络è¥é”€è½¯ä»¶ç½‘络è¥é”€è½¯ä»¶
    网站排å软件网站排å软件网站优化软件信æ¯ç¾¤å‘软件信æ¯ç¾¤å‘软件信æ¯ç¾¤å‘软件论å›ç¾¤å‘软件网站推广软件网站推广软件åšå®¢ç¾¤å‘软件åšå®¢ç¾¤å‘软件

    群å‘软件群å‘软件åšå®¢ç¾¤å‘软件论å›ç¾¤å‘软件网络è¥é”€è½¯ä»¶è®ºå›ç¾¤å‘软件
    ä¿¡æ¯ç¾¤å‘软件推广软件网站推广软件网络è¥é”€è½¯ä»¶ç½‘站推广软件群å‘软件网站排å软件网站推广软件åšå®¢ç¾¤å‘软件论å›ç¾¤å‘软件群å‘软件网站排å软件网站推广软件åšå®¢ç¾¤å‘软件论å›ç¾¤å‘软件
    网站排å软件
    åšå®¢ç¾¤å‘软件
    网站排å软件
    网站推广软件
    群å‘软件信æ¯ç¾¤å‘软件
    å…费论å›ç¾¤å‘软件
    论å›ç¾¤å‘软件
    网站排å软件
    å…è´¹åšå®¢ç¾¤å‘软件
    网站推广软件

    群å‘软件
    åšå®¢ç¾¤å‘软件
    网站排å软件
    网站推广软件
    群å‘软件信æ¯ç¾¤å‘软件
    å…费论å›ç¾¤å‘软件
    论å›ç¾¤å‘软件
    网站排å软件
    å…è´¹åšå®¢ç¾¤å‘软件
    åšå®¢ç¾¤å‘软件
    ä¿¡æ¯ç¾¤å‘软件
    论å›ç¾¤å‘软件
    ä¿¡æ¯ç¾¤å‘软件
    åšå®¢ç¾¤å‘软件
    qq群å‘软件
    邮件群å‘软件
    åšå®¢ç¾¤å»ºè½¯ä»¶
    ä¼ä¸šå录æœç´¢è½¯ä»¶
    ä¿¡æ¯ç¾¤å‘软件
    邮件群å‘软件
    论å›ç¾¤å‘软件
    åšå®¢ç¾¤å‘软件
    网站推广软件
    网络è¥é”€è½¯ä»¶
    全能è¥é”€ç ´è§£ç‰ˆ
    网络è¥é”€è½¯ä»¶
    论å›ç¾¤å‘软件
    论å›ç¾¤å‘软件
    论å›ç¾¤å‘软件
    网络è¥é”€è½¯ä»¶
    ä¿¡æ¯ç¾¤å‘软件
    ä¿¡æ¯ç¾¤å‘软件
    ä¿¡æ¯ç¾¤å‘软件
    群å‘软件

    Posted by: mimi9989 on December 06, 2007 at 06:23 AM

  • wow power leveling
    wow powerleveling
    wow power leveling
    wow gold
    wow items
    feelingame.com
    wow tips
    Most Valuable WOW Power Leveling Service
    wow power leveling faq
    cheap wow power leveling
    wow power leveling
    wow powerleveling
    wow power lvl

    Posted by: wowleveling on December 13, 2007 at 01:11 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds