javasaf

Is there a better Java application framework than Swing?


I'm planning to work on some hobby Java projects. I've done some small-scale projects, so I'm familiar with the language itself and building a GUI with Swing. I'd like to make my work a little less ad-hoc and perhaps find some tools that might be useful out in the real world.

NetBeans now comes bundled with the Swing Application Framework, which seems to be a very useful tool. It helps bridge the gulf between knowing how to create a JFrame and how to use one effectively in the context of a larger application. The problem being that there are large chunks of the API completely undocumented and there's virtually no documentation on how to use it. There are only two questions in the FAQ, the mailing lists are all but dead, and I can't even tell if the project is being actively developed or if it's been abandoned. I've managed to get up and running with it based largely on the two-year-old JavaOne presentation posted on the project's home page.

Is there a better alternative? Is another tool/library/API out there that does the same sort of thing in a slightly more newbie-friendly way? Note that I'm planning to develop desktop applications at the moment, and am not looking for J2EE frameworks like Spring and Hibernate.


Solution

  • The basic principles for creating a good desktop are the same for creating web or enterprise applications. So the core of Spring or other frameworks such as OSGi or PicoContainer can easily be used outside of J2EE. For example, Eclipse uses OSGi as its internal framework. The original use of the Model-View-Presenter (MVC) pattern was for Smalltalk GUI widgets.

    In fact, for myself, I first found and worked with "IoC" frameworks (long before Spring) precisely because I was looking for a framework and organizing principles for desktop application development.

    Update on RCP

    I see some people are recommending Eclipse RCP or Netbeans. I've done quite a bit of Eclipse RCP development and for certain classes of applications, it's great. However, the learning curve is very steep and the feature set may be way more than you need. Keep that in mind for any framework you investigate.