Fog Creek Software
Discussion Board




Any good GUI builder tools for SWING?

I'm kind of a newbie at Swing, and would really, really prefer to use some sort of graphical layout tool.  I've played with Netbeans a bit and like it, also Idea, which in other ways is excellent but the gui tool is weak.  Are there other tools out there anyone might recommend?

dave
Tuesday, August 24, 2004

I think Borland allow Personal editions of JBuilder to be downloaded free (and will undoubtably have a free trial of the more heavy weight versions) and it seemed pretty good last time I used it.

Anonymouse
Tuesday, August 24, 2004

Although I don't love it over-all, NetBeans (which is free) has a great GUI builder. It handles the GridBagLayout particularly well.

Tom Mack
Tuesday, August 24, 2004

I too am looking for a decent builder.  Eclipse and Netbeans don't handle 'inherited' forms very well.  The 'stuff' from the super form does not appear on the current form during design and there seems to be significant manual work to get this working.

Any better options?  (For a Delphi developer, this is quite frustrating)

David

David Freeman
Wednesday, August 25, 2004

Steer well clear of the GUI builder in JBuilder. It's complete shite.

I've heard that IntelliJ Idea has a GUI builder but I haven't used it. Might be worth a look. http://www.jetbrains.com/idea/features/gui_designer.html

FWIW, in the 6 years that I've been developing Swing apps I still maintain the biggest pain the backside is dealing with GridBagLayout so I avoid it like the plague where possible. You can still create good UI if you rely on nested panels using either BorderLayout, GridLayout, or FlowLayout.

TheGeezer
Wednesday, August 25, 2004

http://www.swing-designer.com/

swt wonk
Wednesday, August 25, 2004

I use the IDEAJ GUI builder.

Pretty easy to use once you have their "extended" Swing palette.

Drop the controls (JComponents I mean) on the form more or less like you want.

Put some springs here and there for controling resizing.

Maybe group some controls together so that they stick.

Hit the "do the layout for me" button and the controls will be put into a layout.

You can also link the form to a class so that you can add behaviors (ActionListeners etc) to it.

Pretty ok for simple dialogs.

They have their own layout manager to handle the thing but it's redistributable and light.

For more accurate layout (proper Windows guidelines for example), have a look at www.jgoodies.net (Forms). The library is free and it's possible to create very precise layouts. There is a GUI builder tool for that (It's named abeille or something like that - commercial)

But frankly, I always end up in hand coding my GUIs since basic forms do not cut it (animations etc).

RedFox
Wednesday, August 25, 2004

Relating to the comment about GridBagLayout, I felt the same for a while but I find myself using it quite a lot for my own components since it's the smartest of all the basic layouts you have and can handle minimumSizes, preferredSizes and maximumSizes. Something that others do not do.

I've made a set of helper methods to help with GridBagLayout and it's easy now.

RedFox
Wednesday, August 25, 2004

What do you want? Ease of use? Power? Nice clean code generated for you?

In the days when I Swung, I used JBuilder, which has a fantastic GUI builder, but generated very messy code. It needed a lot of clean up work afterwards. Maybe he is being better today.

Herr Herr
Wednesday, August 25, 2004

Not used the GUI builder in JBuilder, but my opinion is that the whole thing is shite.

David - what do you mean "'inherited' forms"?


Wednesday, August 25, 2004

JBuilder has an excellent gui builder - the Foundation edition is free for commercial user so try it out.

MT
Wednesday, August 25, 2004

I've spent the past few months knee-deep in hand-scripting layout code in Swing, and I've come up with three important truths;

1. In the GridBagLayout, widgets will never expand with a weight of 0 (default). I've lost far too much time by forgetting this.

2. Use the proper layout manager for the job. The simpler ones like BoxLayout do their job very very well.

3. Don't be afraid of nesting layout schemes. While you will have to be more careful to keep the code neat, it can greatly minimize the requirements for 'tricks'.

One additional point if I may. Getting everything to line up perfectly can be a pain if nesting using BoxLayout since it puts outside gaps around the edges. GridLayout does this much better.

I realize this is a bit off-topic, but I wish someone had told me these simple facts when I got into it. I had to slug through it myself (with out-dated manuals)

One particularly good reference/tutorial is found at...

http://www.prism.uvsq.fr/~bad/Java/AWTLayoutMgr/shortcourse.html

A question if I may; anyone have any experience using the SpringLayout? Good or Bad?

Edward
Wednesday, August 25, 2004

I started Java development with Netbeans couple of years ago. I liked the GUI designer very much, but nowadays I find myself doing the GUI coding manually.
Take a look at the jgoodies site ( www.jgoodies.com ). There's lot of interesting tools to create good looking interfaces over there.

Axel Hallez
Wednesday, August 25, 2004

You should take a look at the JGoodies suite of tools.  They have a free set of tools that allow you to build Swing GUIs without the need of a GUI Builder (though there are third party tools that let you visually build GUIs using the jgoodies APIs).  They have sample apps on their site for you to preview.  It is a really well done API.

http://www.jgoodies.com/

ac
Wednesday, August 25, 2004

<sermon>

Why has no one else successfully copied the Next/Apple idea of "freeze dried objects"?

http://www.stepwise.com/Articles/Technical/FreezeDriedObjects.html

Using code to create a GUI seems so 1980s to me.  Less code == faster development and fewer bugs, in almost all cases.

I think MS is finally taking this tack with their XML GUI thingy for Longhorn.  Is there a Java equivalent?

Reducing the number of lines of code seems to be becoming an Apple developer mantra.  Please please please rest of the software industry adopt this mantra, too.

</sermon>

Jim Rankin
Wednesday, August 25, 2004

*  Recent Topics

*  Fog Creek Home