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?