Skip to main content

Lucky Ball and Chain

Posted by editor on June 5, 2006 at 10:38 AM EDT

Swing to get an application framework?

Maybe the problem with Swing development doesn't begin with squabbles over look-and-feels or lightweight rendering. Maybe it starts with:

public static void main (String[] args)

How are you supposed to get a desktop application out of that? "Oh," say the battle-weary Swing veterans, "there are a hundred ways to do it." Yeah, that's the problem: there are a hundred ways to do it. What's the difference between different approaches; what works better and what works worse? Do you build your GUI on the main thread and not worry about event-dispatch until you're done? How do you handle shutdown? Where do you get resources from? Heck, how is a host operating system supposed to know that this is an application? You're not seriously expecting the end user to open up a terminal window and type java -jar MySwingApp.jar, are you?

To some degree, the problem with "Swing applications" isn't about the "Swing" part, it's all about the "application" part. This hypothesis might explain why there isn't much traction behind SWT applications either, and why we're seeing more interest in "rich client platforms" based on Eclipse, NetBeans, etc. Of course, an important problem with the latter point is that, by and large, most desktop developers are not writing apps as sophisticated as the IDE's from which these platforms originated, so the hammer may be too large for a given developer's nail.

Hans Muller is taking a swing at the problem by introducing a simple framework for Swing applications, to manage resources, application life-cycle, and a few other topics, but without hiding Swing or trying to add another layer of complexity. He introduces it in his blog JSR 296 Bows - Swing Application Framework: "On Tuesday May 15th the JCP Executive Committee approved JSR 296, "Swing Application Framework". I'm the spec lead for JSR 296 and this is the JCP equivalent of a birth announcement. A rather long and meandering birth announcement, with a web started demo at the end."


Also in today's Weblogs, Andrei Dmitriev addresses the question of To Fix or "Will not fix": "A user once reported a defect then has a very limited ability to affect that issue. He couldn't participate in discussion much. This article describes how to influence on defect resolving from the user side."

Barbara Kurshan uses her blog to discuss an Open Source Curriculum for Africa: "I have just returned from two weeks in Rwanda and Ethiopia. I was there to explore wiring Rwanda and to attend the eLearning conference in Addis Ababa. It was a fascinating and certainly eye-opening trip."


In this week's Spotlight, the JGoodies Looks project, a subproject of the larger JGoodies effort, provides a pair of appealing look-and-feel packages for Swing. The JGoodies Windows L&F "focuses on a precise emulation on Windows 95 / 98 / NT / ME / 2000 / 2003 / XP / Vista" in various widgets, honoring desktop font size and screen resolution as it affects sizes, insets, and widget dimensions. Meanwhile, the Plastic, Plastic3D, and PlasticXP L&F's are "elegant multi-platform Look&Feels that look good on all Windows platforms, including XP."


In Also in Java Today, Robert Cooper kicks off his introduction to the project that was THE talk of JavaOne, in Working with the Google Web Toolkit. "The Google Web Toolkit (GWT) was rolled out for JavaOne 2006 at an innocuously titled session. Due to what I assume was a timing miscommunication, the Google Blog scooped the presentation, but the impact was no less felt." With that understatement, Cooper's introduction shows you how to build an Ajax table with GWT, wire it up to a server-side data source, and handle user interaction on the client side.

The SDN Ajax Developer Resource Center pulls together a wealth of Ajax information in one place: introductory material, tutorials, sample components, tools, news, event announcements, blogs, screencasts, and videos. In particular, it shows how to take advantage of Ajax in Java EE 5, NetBeans, and Java Studio Creator.


In Projects and Communities, Robert Stephenson's Blog Graduation Day, part II points out four more recent graduations from the GELC, saying they " fall under the general rubric of academic research, but are about as diverse an they could be." The graduated projects are netbeanslaboratorysupport, relationalquery, jsteganography, and filewatcher.

Rubik's Cube, in a mere three dimensions, is so 20th Century. The Magic Cube 4D offers a four-dimensional analog of the classic Rubik's Cube puzzle, in Java. Its home page offers an applet version that you can play by clicking on the image of the solved hypercube. A double-clickable jar with more features (including difficulty settings, automatic scrambling, and undo/redo) is also available.


In today's Forums, kellyohair continues to discuss compilation hazards in Re: Getting the JDK to use gcc: "The BIGGEST issue we have had with changing compilers is having to track down buggy compilers or optimizers, or bugs in our own code that start manifesting themselves under new optimizations from those compilers. It usually requires getting specific engineering teams involved that understand the code details, and although these kinds of problems get solved, the logistics of co-ordinating the teams and getting their dedicated time can be overall, very slow. Initial ports can skip optimizations and have an easier start, but ultimately things like the VM do need to get fully optimized."

wetterwald is interested in Joining SwingX project: "As any other Swing applications developer, I am carefully following all great SwingLabs subprojects. If I am writing this message, it is because I would be very interested in joining the SwingX project. Despite having some ideas to play around with, due to my limited experience with participating in large open source projects, I would rather be more interested in knowing if there is any developer which is already working on a component that would like some help and that wouldn't mind guiding me the first days. I learn fast, anyway."


In today's java.net News Headlines :

Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.


Current and upcoming Java Events :

Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.



Swing to get an application framework?