GridBagLayout, Best Done Visually
  Posted April 08, 2004    PermaLink    Comments (2)  

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.

Trackback URL
  TrackBack URL for this entry:
Date:April 8, 2004 08:00 PM

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

Name:Danno Ferrin
Date:April 8, 2004 09:30 PM

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 Comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Remember me?

Email Address: