Skip to main content

All I Want

Posted by editor on October 20, 2006 at 8:37 AM PDT

Why isn't there a prototypical Java desktop demo app?

One of the things that curious about AWT and Swing development is that you don't subclass some kind of Application object or otherwise work in some kind of framework that expresses the common elements of a desktop application. Instead, like any other application, public static void main (String[]) is the beginning of the universe, as far as your app is concerned. Not that this doesn't have its benefits -- many desktop classes should work equally well in an application, applet, or some other visual SE environment, and don't need to be aware of the context in which they run.

Still, particularly for the beginner, it's hard to see the best way to really get started with a Java desktop app. majeric makes note of this in
today's Forums, in the message
Simple Client Applications:

What surprises me about Java on the desktop is that there are very few simple clean example of it in use that are fundamental. I've taken it upon myself to write a Java application like Mac OS X's TextEdit. I thought it functionally is a nice simple example of an application where Swing would support all the necessary elements that I would need to put into my code. I have to admit, that I learn best by example. I went looking for code snippets here and there that cover all the aspects of development that I would need: Undo/Redo features. RTF/HTML/Text management. Document save/dirty/save as/untitled management. Other than some exceptionally complex examples like Eclipse's editors or JEdit or the like. There are very few *simple* examples. You'd think University students would be churning these things out by the boat load. Simple Paint Programs. Simple Text Editors. Simple Spreadsheet Programs. Vector Graphic Editors etc....Yet... Really, there isn't that much....Anyone care to prove me wrong? — 

He goes on to make a similar point in another thread, Re: Swing Frameworks and Best Practices:

I've love to see s suite of open source applications that were tailored for their platforms with a minimum amount of change. I am starting to see some good examples but I'm surprised that people still haven't written a basic RTF editor.

Utlimately people seem more interested in buildng clever components for Swing than they are in building clever applications that use those components.

I'm holding out... in the meanwhile. I am working on my own.

One wonders how much of JSR 296 will fill this role, but still, there's a sense that the ideas of what applications are, how they manage documents, etc., what "save as" means, etc., are things that are fairly well understood and do not merit constant reinterpretation and reimplementation by successive generations of Java desktop developers. What do you think, is majeric on to something here?

Also in
the Forums, the bug-tracking thread
Re: Horrible JComboBox regression in b99 with WindowsXP L&F finally seems to be winding down, with a thumbs-up from jjburke:
"joshy, thanks for getting this fixed in B103. I tried it and it works flawlessly. Also thanks for getting this navigated through your approval bureaucracy. Reminds me of working in retail where we had September-February code freeze that took an act of god (well a vp anyhow) for any change or install."

The latest Poll asks "Which feature of JSR-277 most appeals to you?" Cast your vote on the front page, then visit the
results page for current tallies and discussion.

In Java Today,

Artima blogger Howard Lovatt kicks off a "Pattern Centric Blog" series with a look at the current JDK 7 closures proposal in Inner Classes or Closures. "One of the areas receiving a lot of attention for J7 is simplifying and extending the capabilities of inner classes or adding a new construct the closure. This blog examines the options and compares the different proposals using a typical example, inject."

Egjug, the Egyptian Java Users Group has announced Egjug Technical Days, the first such event in Egypt. They write: "We will make a full day event with many presentations. Our main speaker is Raghu Kodali, a consulting product manager and SOA evengilist for Oracle Application Server. Kodali leads next-generation SOA initiatives and J2EE feature sets for Oracle Application Server."

Sun has posted a survey to help with the design of JSR 295 and NetBeans 6.0. "To make these two projects a success, we need your input. Please take this short survey to help us understand what database connection technology Java desktop developers are using. The survey closes November 9th 2006. Please don't be put off by how the scary policy statement at the top of the survey looks. It's one of those corporate things we can't avoid, and since we're not requiring an email address, we can't track you in any way."

Rémi Forax is intrigued by the thought of JSR 277 and ahead of time compilation. In today's Weblogs, he wonders
"Will we see in a near future, more VMs providing a module repository implementing ahead of time compilation? And thus VMs that never interpret bytecodes!"

Switching from static compilation to creating new code at runtime, Eamonn McManus checks in with the blog
Build your own interface - dynamic code generation:
"Sometimes static code isn't enough and you need to build code dynamically, at run time. That's usually a hefty proposition, but if the code you need to build is just an interface, it's actually relatively simple. Here are some of the reasons you might want to build interfaces at run time and how you might go about it."

Trip and Tick 200: WebStart me up, baby!, Evan Summers comes across one of the best-known tools for WebStart deployment:
"So today i tried pack200 - and it compresses my jar from 440k to 110k! OK, so, um, clearly all WebStart jars should be made this way."

In today's
News Headlines

Registered users can submit news items for the href=""> News Page using our
news submission
. All submissions go through an editorial review before being
posted to the site. You can also subscribe to the href=""> News RSS

Current and upcoming Java

Registered users can submit event listings for the href=""> Events Page using our href="">events submission form.
All submissions go through an editorial review before being posted to the

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 it will be
archived along with other past issues in the href=""> Archive.

Why isn't there a prototypical Java desktop demo app?