After a little experience, it isn't difficult to build a Graphical User Interface (GUI) in Java, but it is hard to get something that is easy to write and maintain, and looks good. Many styles of GUI programming simply don't scale well.
The new NetBeans Matisse project looks very promising.
Everyone says that user interfaces should be separated from the logic of a program. One of the most promising approaches is to represent the GUI in a markup language (think HTML forms with a full set of widgets). The Mozilla XUL group (see link below) has been one of the most active in proposals in this area, altho their actual offerings don't seem quite ready for prime time. Some good links to start with follow.
I've tried SwixML and Thinlet, both of which read an XML file to build the GUI at execution time. On small test programs I really liked them. They're not quite mature yet (eg, weak documentation). SwixML has a number of users and a helpful mailing list.
Take a look at XUL and Java. It seems obvious to me for some comments by Karsten Lentzsch of JGoodies for some criteria that might be used in evaluating this not-entirely-obvious technology.
Microsoft announced XAML, an XML description of user interfaces (and much more) for the upcoming Avalon system (see below). It looks like Microsoft may take the lead in this area; and I wouldn't be surprised if their work sets the future direction. Java's Java Desktop Network Components (JNDC) (see www.javadesktop.org/articles/JDNC/index.html, Java Desktop Network Components) shows some philosophical interest in XUL.
I didn't look closely at most of these, but this gives the idea that a lot of people would like to make this work. My goal is to find something that makes simple programs simpler, ie something for student programs. Some of these frameworks may be very good for simplifying large programs, but don't seem simpler for small programs.
|SwixML||www.swixml.org - I've tried SwixML with mixed feelings. On one hand, it forced a very nice separation of presentation from other concerns, and it worked well. One the other hand, there was a lack of documentation and error reporting that made development very time-consuming. If you put in the time to become an expert, this may be a rewarding approach. Open source.|
|Thinlet||www.thinlet.com - Open source. The author's philosophy is aim it at handheld devices. This is worth a look if you're interested in something small, and not based on Swing. I liked the previous version, but haven't looked at the new version.|
|JGraphAppKit||freshmeat.net/projects/jgraphappkit/ \ - Interprets XML files to build menus and toolbars. Small footprint. Free for single developers, otherwise must buy site license. I haven't looked at it yet.|
|Luxor||luxor-xul.sourceforge.net - It's very hard to focus on this. It's strange that examples from different authors look completely unrelated in how one uses Luxor. This may be good, but it requires more time that I have to sort out what's happening. Open source.|
|SwingML||swingml.sourceforge.net - Open source. Looks good, but it isn't obvious how to connect the GUI to a Java application. Seems to be oriented toward Applet server communication. Nice demo. Last update Aug 2003.|
|CUF||cuf.sourceforge.net/ - CUF (Client Utilities and Framework) provides an XML representation of the GUI that will work with either Swing or .NET. Interesting, but where's the documentation? Open-source.|
|AUIML||www.alphaworks.ibm.com/tech/auiml (Abstract User Interface Markup Language Toolkit). Includes an interface builder, and same interface can be used either as Swing or HMTL servlet. Works with the Eclipse Visual Editor.|
|RIB||www.alphaworks.ibm.com/tech/rib - Reflexive User Interface Builder -- Another IBM approach using XML to represent a Swing / SWT user interface.|
|xmlgui||xmlgui.tigris.org - Interesting, but little documentation. Has editor. Defines additional useful widgets. Has been used in real project so probably works ok. Not appropriate for simplifying student programs. Open source.|
|SpeedGJ||www.wsoftware.de/SpeedJG - I'm looking for free student tools. Might be good, but at $70 I'm not going to check it out.|
|FormBuilder||The SwingEmpire FormBuilder GUI editor builds on the excellent JGoodies layouts, but it doesn't seem mature yet. I'm not sure.|
|SMaker||www.vienas.ch/smaker/index.html - Looks plausible, but it's not free and the cost isn't on the website.|
|XUI ||xui.sourceforge.net - Open source. Seems to be actively worked on. Doesn't appear to make small programs simpler. This is not the same as the XUI project listed below.|
|XUI ||geekkit.bcit.ca/xui/ - Not the same as the XUI project above. I haven't really looked at it yet.|
|XMLTalk||sourceforge.net/projects/xmltalk - Target is handhelds. Open source.|
|KoalaGML||koalagml.sourceforge.net - Open source. Inactive?|
|Ultrid||www.ultrid.com - There is active development on this project. My first look at it had left a lot of Java details unexplained, but there's a lot more there now. Supports many layouts including table layout, splash screens, wizards, localization, and much more. Also strong support for various scripting languages. Worth a look. It appears to be free (beta 0.7.5), but without source.|
There are related efforts, such as
|XAML||Microsoft's new XAML technology can be used to specify GUI (and much more) design in XML, and the tags directly map into C# classes and other MS languages. Take a look at this MSDN article - msdn.microsoft.com/msdnmag/issues/04/01/Avalon.|
|XUL||www.xulplanet.com/ - XUL is a spinoff of the Mozilla browser user interface project that has inspired many similar projects. This is somewhat of an umbrella organization for XML interfaces.|
|XForms||www.w3.org/TR/xforms may define sufficiently enhanced XML forms that can be used for program interfaces, but ...|
|BML||Bean Markup Language www.alphaworks.ibm.com/tech/bml/|
|JEasy||www.jeasy.de - $49|
|text2gui||www.tacosoftware.com/products/text2gui Uses resource bundles to store the GUI description in text. Can easily internationalize. Looks interesting. Not free.|
|jvider||www.jvider.com - $69|
|JFormDesigner||www.jformdesigner.com - 129 Euros. Has some very nice features.|
|JGB||Java GUI Builder jgb.sourceforge.net - Open source. Inactive?|
|LayoutBuilder||www.jdc-software.com - Free 30-day trial, $20|
|Atris||sourceforge.net/projects/atrisframework - Open source.|
|Foam||www.computersinmotion.com $150, 15-day free trial, but it's free to students and educators. Uses it's own layout manager. Take a look at the video. Separates the interface from "model". Apparently cross platform. Looks interesting, but website doesn't have much documentation.|
|Qt Designer||www.trolltech.com/products/qt/designer.html can produce a .ui file that can be run thru UICompiler (uic.sourceforge.net). I've tried this combination, and was unable to get it working without errors, perhaps because on Windows the only free version of Qt Designer (2.3) is old and didn't play well with UICompiler.|
Altho Swing (or the older AWT) is the standard for a Java GUI, there are alternatives. These alternatives exist because some are smaller and/or faster than the very general, but large and somewhat sluggish Swing library.
|SWT||Standard Widget Toolkit, www.eclipse.org. This free GUI library from IBM provides an interface to the native system GUI (currently Windows and GNOME). The advantages are a more responsive user experience, and the Eclipse GUI editor for uses SWT, not Swing. The disadvantages are a different API so your programs can't simply be changed from Swing to SWT, and it isn't as portable, at least until versions are available for more systems. It's possible to compile completely native (no virtual machine!) programs for Linux.|
|SwingWT||swingwt.sourceforge.net. This free GUI implementation provides a Swing compatible API, but uses SWT for the implementation. Because it's compatible with Swing, it's easy to try this out.|
|BambooKit||www.bambookit.com. Light-weight XML-based GUI good for small devices.|
|Zaval||www.zaval.org. Another light-weight GUI.|
UIHierarchy tries to capture the hierarchical nature of layouts by providing classes that reflect this nicely. Has links to similar efforts.