« Don't Laugh, I've Done the Commando Pattern | Main | Make your MFC Apps look like Metal?! »

GridBagLayout, Best Done Visually

When Eclipse first rolled out their visual editor there were a couple of things I didn't like. The first was something that I had grown accustomed to in NetBeans (mostly because I saw how much it failed in Visual Cafe). The management of the components was not managed by a seperate code area or data file but it is extracted from the source and compiled code. What a recipe for screwed up code. What NetBeans does is it manages a <foo>.form file next to your <foo>.java and uses "guarded blocks" to render the meaning of that .form file, blocks you cannot edit directly. However you can render and insert code anyplace in that process (via the properties sheet) if you are an absolute control freak. It was hard to get used to initially, but for writing GUIs I think that it is the way, ultimately, to handle GUI writing in an IDE. What Eclipse is trying to do is Two-Way Editing, which I've never been able to be a well behaved enough coder to live with. It's usually turned into two way farking within the first ten minutes of use, and that's the ten minutes I decide that what I have is better.

That problem was a little annoyance compared to the second major hole in the Visual Editor, one that alan also found. This crippling problem is that there is no support for GridBagLayout. This is more than "a little way to go" but is a gigantic hole right in the bulls eye IMHO. I knew that this was going to be an issue when the demo video for the Visual Editor totally glossed over layout managers and went straight to absolute positioning. Absolute positioning is bad. It lives in that 20% of the 80/20 rule: the 20% that is english/windows/defaults only. Of course I am not targeting the 20% of the market that is english only, windows only, and default graphics setup (that other 80% either uses a non-windows platform, a language other than english, or they do things like crank up their font points). NetBeans does have a GridBagLayout editor, and a good one to boot. In fact if it didn't have one I may still to this day be a "code GUIs by hand" bigot.

Thank goodness for quality tools.

Comments (2)

asdf:

I thought your title was a joke, but then you misspelled recipe ('resipie') and I realized you just can't write.

Ok, I pasted my entry into Word and tried to make it look like Word wanted to look. Better? I really shouldn't post in the middle of debug loops, but I figure since I'm deploying to WebSphere I got the time. But I'm still in code mode and if it compiles then it is speled properly.

Post a comment


About

This page contains a single entry from the blog posted on April 8, 2004 8:36 AM.

The previous post in this blog was Don't Laugh, I've Done the Commando Pattern.

The next post in this blog is Make your MFC Apps look like Metal?!.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33