Is there a better Java application framework than Swing?
Asked Answered
F

5

6

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.

Fiberglass answered 14/2, 2009 at 3:19 Comment(0)
D
5

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.

Dedication answered 14/2, 2009 at 3:37 Comment(1)
I've used Eclipse in the distant past as an IDE and have been using Netbeans lately, which is where I found the Spring AF in the first place.Fiberglass
M
4

For more complete frameworks:

The NetBeans platform perhaps http://www.netbeans.org/kb/trails/platform.html

Or the Eclipse RCP http://www.eclipse.org/articles/Article-RCP-1/tutorial1.html

Matchbox answered 14/2, 2009 at 3:33 Comment(0)
M
3

For a GUI library I'd lean towards SWT. Eclipse maintains it and uses it for its IDE. I believe Azureus used it too. Looks good on multiple platforms and pretty easy to use.

Misspeak answered 14/2, 2009 at 3:32 Comment(1)
SWT isn't a GUI framework, it's a widget toolkit. Moreover, it's a complete alternative to Swing. I believe eaolson is looking for more of a desktop equivalent of web frameworks such as Struts, Wicket, etc. If he does use SWT, then he should consider Eclipse RCP, which is a full framework.Dedication
B
3

If i were starting a Java based desktop application today, i would use JavaFX.

http://en.wikipedia.org/wiki/JavaFX

Brosine answered 15/2, 2009 at 0:50 Comment(0)
A
0

You could also use the Java bindings of Qt. Qt is a multi-platform C++ framework which has, in my opinion, one of the most readable object models for GUI design.

Have a look at the Trolltech (Nokia) Qt website.

You can see a demo (which also has source code) using the Java Web Start feature. It gives a good impression about what can and can't be done, and how the source code looks.

Amarette answered 14/2, 2009 at 10:54 Comment(1)
Both links in answer are dead.Helsie

© 2022 - 2024 — McMap. All rights reserved.