views:

1344

answers:

7
A: 

Not really a tool, but I've been working on annotating important things in the JavaDocs for Swing (and several other APIs). Too many methods contain surprises like "don't call this if you want a refresh, call X instead". I use a tool that I built for my PhD to access that kind of info (it highlights calls in the source code to methods that have those sort of things).

IMHO, the JavaDocs for swing are difficult to use because they combine information that is meant for people using an object and people subclassing existing classes.

Uri
Sounds interesting. Anything that you are going to make available to the rest of us?
willcodejavaforfood
Right now it only supports Eclipse. I've still got to do some cleanups and update the annotations database before I am presenting it at Eclipsecon at the end of March, but if you want to try it out, visit http://emoose.cs.cmu.edu or contact me and I'll gladly help you with the install.
Uri
+3  A: 

I pretty much only use GridBagLayout for production code unless the GUI is so simple that I can get away with a BorderLayout. I sometimes look into other LayoutManagers, but never really found the need to change since GridBagLayout can do pretty much anything I need.

The installer I use for my own stuff is izPack and works for me so far.

It has been a long time since I really read any Swing books now. Obviously the Java Swing one from O'Reilly is the de facto bible :) When it comes to books on design I do have a lot of recommendations but that might be off topic?

willcodejavaforfood
Totally Gridbag - http://madbean.com/anim/totallygridbag/
Ran Biron
@Ran Biron, that is the best comment I have seen on SO thus far. That is so reminiscent of my GridBagLayout experiences. At one point I even wrote a GridBagLayout wrapper for most of the stuff I do, but it's hard to really grok. +1 for this answer so more people see this comment :)
Yar
+1  A: 

Two useful Swing related libraries:

  1. The Swing Application Framework is a light framework that simplifies the creation and maintaining of small- to medium-sized Java desktop applications. The framework consists of a Java class library that supports constructs for things such as the following:

    • Remembering state between sessions.
    • Easier managing of actions, including running as background tasks and specifying blocking behavior.
    • Enhanced resource management, including resource injection for bean properties.

    Here's an article about it. It's been integrated with Netbeans 6.0 and later.

  2. EventBus is a Swing-oriented publisher-subscriber framework that I've found very useful for updating GUIs.

bcash
A: 

For books, take a look at the answers to Swing Programming Books.

Miles D
+1  A: 

Netbeans with the GUI WYSIWYG editor. It makes creating Java 6 Swing forms very easy. I subclass the forms to add functionality to ensure continued tool support.

I've also used SwingX for widgets like date pickers and collapsible panels.

Plus there's always SwingWorker in the JRE for running background jobs that update the UI.

Dan Vinton
+5  A: 

Spring Rich Client and JGoodies are the base of my team's GUI applications; Spring remoting for connecting to server, and Java Web Start for deployement.

Domchi
+7  A: 

Here is what I use:

  • "Framework": Swing Application Framework, does not do much, but does it quite well (if you use it you may want to take a look at one presentation I did last year)
  • JTables: handling tables is often a pain (lots of boilerplate code...); I generally use GlazedLists which simplifies the work a lot (and brings many improvements)
  • EventBus: this was mentioned in another answer
  • LayoutManager: DesignGridLayout (shameless plug, this is one of my open source projects)
  • Look & Feel: Substance is very good in some situations where you don't want to use the system look and feel
  • Docking library: if your application needs docking, you will find MyDoggy useful (and it has a well-written API). One problem it has is a bad integration with some third-party look and feels (like Substance)

All these libraries above are open source.

In addition to that, I have my own set of utility classes that, among other things, help integrating the GUI with a Dependency Injection library: I have a set of utilities for HiveMind container (for the few developers that know it and still use it), and another -in preparation, soon open sourced- for Guice.

I have read no specific book about Swing development, but I have used Swing for about 10 years now (not continuously however). Hence I have no recommendation in terms of books (unfortunately, because I admit that this is one weak point of Swing).

"Filthy Rich Clients" book is useful only if:

  1. you know Swing well
  2. you want to build "fancy" GUIs
jfpoilpret