Java Basics

By hand vs GUI editors

GUI editors. There are a number of GUI editors that allow you to build a GUI using a drag-and-drop style. These can be quite convenient, but they each have their own peculiarities, and require some amount of learning before you're proficient. The end result of learning one well is that you can build attractive graphical user interfaces very quickly.

Must learn basics first. Although you will be much more efficient in building a GUI with a GUI editor, you still need to understand how things work. Therefore it is imperative that you learn how to build them by hand, which is pretty much the only way to really understand them. After you know what's going on, you might want to switch to a GUI editor - some programmers like to use them, some think they don't really help much, and some think they are a bad idea.

I like building them by hand, but perhaps I'm cheating because I use my own layout manager, which makes things go very easily for me. My first reaction after using the NetBeans Matisse GUI editor, was that I really liked it and that it would make me a lot more productive. As I've used it for larger projects, I'm not longer convinced it's such a good idea.

Pro GUI editor

Here's what Josh Marinacci, one of the Sun Java GUI hotshots and coauthor of Swing Hacks: Tips and Tools for Killer GUIs says:

When it comes to graphical user interfaces (GUIs), don't use a layout manager! Start by building all of your screens in Matisse, the new GUI builder in NetBeans IDE 5.0. It will reduce your GUI-building time by a factor of five and lower your learning curve dramatically. The days of hand-coding GUIs are over!

Con GUI editor

This is based on my use of the NetBeans Matisse GUI editor, which has a reputation as one of the best.

Solving the wrong problem

I've probably overstated the negative side a little too much, but I think the main reason the GUI editors are getting so much positive press is that GUIs are too hard to code. The real solution is to make GUI coding easier! Swing's orientation is to make all things possible, but simple things are not always simple.

Other reading