| | |
Beware the GUI builder
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
http://www.hacknot.info/hacknot/action/showEntry?eid=76 has an excellent rant about the problems of visual editors (aka GUI builders).
While he talks specifically about Java, the same holds true for all of them. And yes, that means Visual BASIC and Delphi as well, languages which traditionally are seen as almost purely visual.
I've done several midsized Delphi applications and in all of them I ended up writing custom code to manipulate the screen layout and content on the fly, something GUI builders have always promised to make a thing of the past but fail to deliver.
While he talks specifically about Java, the same holds true for all of them. And yes, that means Visual BASIC and Delphi as well, languages which traditionally are seen as almost purely visual.
I've done several midsized Delphi applications and in all of them I ended up writing custom code to manipulate the screen layout and content on the fly, something GUI builders have always promised to make a thing of the past but fail to deliver.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
•
•
Join Date: Jun 2004
Posts: 609
Reputation:
Solved Threads: 8
Hi everyone,
Fantastic article
Richard West
Fantastic article
Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
I'm curious as to how it lays the code out for you. Does it still follow the right form in which you want? I remember when I was like 12 and "trying" to learn VB.NET(failed miserably), I thought that was the coolest thing in the world that I had to do basicly no programming except for a few lines in methods generated for me, then show off the crappy programs to my parents. Now, I would rather do it myself rather than trying to learn how to work the programs and stuff like that. But I really enjoy using the command line. At least for now!
JBuilder does an excellent job. Of all the GUI builders I've used (and I've used (or rather tested) quite a few) it does the best job.
The code it creates is actually human readable, and it does a remarkable job of importing manually written code as well (even if it doesn't conform to its paradigms).
The current versions have automated code formatting options which correct things like indentation and spacing, block editing options to change say the name of a local variable instantly (select the block, edit the name, and all other occurrances in that block change as well), etc.
The code it creates is actually human readable, and it does a remarkable job of importing manually written code as well (even if it doesn't conform to its paradigms).
The current versions have automated code formatting options which correct things like indentation and spacing, block editing options to change say the name of a local variable instantly (select the block, edit the name, and all other occurrances in that block change as well), etc.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
I thought the article very good too. The Layouts issue will run and run I'm sure but being fairly new to Java I'm still finding it difficult to code my screen layouts.
Let me set a context for a layout on a screen tab. A large scrolling list, a large scrolling 2 column table and a smaller 6 column table, 6 buttons, a text field and a label. The extact details don't matter but I am thinking of an interactive style screen.
First I was using flow layout, and then box with several panels but I find myself trying to chase and check what needs a preferred size setting etc. Perhaps I use too many panels but I understood that was a good idea to simplify the whole screen into smaller simple layouts. Unfortunately I still get displays with 6 column JTables smaller than two characters!
Recently I've found GridBag more useful although initially I had been put-off it by the advice I mentioned above. Once you get the hang of the weights and column spans it seems to offer a single layer of control.
Any experienced advice on the subject very welcome.
I was using Jbuilder but currently use Eclipse.
Let me set a context for a layout on a screen tab. A large scrolling list, a large scrolling 2 column table and a smaller 6 column table, 6 buttons, a text field and a label. The extact details don't matter but I am thinking of an interactive style screen.
First I was using flow layout, and then box with several panels but I find myself trying to chase and check what needs a preferred size setting etc. Perhaps I use too many panels but I understood that was a good idea to simplify the whole screen into smaller simple layouts. Unfortunately I still get displays with 6 column JTables smaller than two characters!
Recently I've found GridBag more useful although initially I had been put-off it by the advice I mentioned above. Once you get the hang of the weights and column spans it seems to offer a single layer of control.
Any experienced advice on the subject very welcome.
I was using Jbuilder but currently use Eclipse.
Personally I hate GridBagLayout 
But don't use a single layout manager, experiment with combining them. You can place containers inside containers, using different layout managers for each as required.

But don't use a single layout manager, experiment with combining them. You can place containers inside containers, using different layout managers for each as required.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
•
•
Join Date: Aug 2005
Posts: 216
Reputation:
Solved Threads: 8
I actually prefer using the GridBagLayout. It is definantly the most powerful layout and if used correctly, can produce great looking layouts. The biggest key with any GUI layout is componitizing the whole thing. E.g.: placing like components on their own JPanel and then taking all the componitized JPanels and placing them on one larger JPanel.
The only other layout manager i use is flow layout and the only time i use it is when creating a popup windows button bar.
Regards,
Nate
The only other layout manager i use is flow layout and the only time i use it is when creating a popup windows button bar.
Regards,
Nate
•
•
Join Date: Jun 2004
Posts: 2,108
Reputation:
Solved Threads: 18
•
•
•
•
Originally Posted by hooknc
I actually prefer using the GridBagLayout. It is definantly the most powerful layout and if used correctly, can produce great looking layouts. The biggest key with any GUI layout is componitizing the whole thing. E.g.: placing like components on their own JPanel and then taking all the componitized JPanels and placing them on one larger JPanel.
The only other layout manager i use is flow layout and the only time i use it is when creating a popup windows button bar.
Regards,
Nate
![]() |
Similar Threads
- GUI Builder For Swing (Java)
Other Threads in the Java Forum
- Previous Thread: help me on this syncronization??????
- Next Thread: menubar
| Thread Tools | Search this Thread |
2dgraphics account android api apple applet application array arrays automation banking binary binarytree bluetooth chat chatprogramusingobjects class classes client code component data database derby design eclipse encryption error event exception fractal game givemetehcodez graphics gui homework html ide if_statement image inheritance input integer interface j2me java javadesktopapplications javaprojects jlabel jni jpanel jtextfield julia linux list loop map method methods midlethttpconnection mobile monitoring netbeans newbie nullpointerexception open-source print printing problem program programming project property recursion reference ria scanner screen search server set size sms sort sourcelabs splash sql sqlite static stop string swing testautomation threads time tree ui unicode validation windows







(though I use JBuilder myself, but not before I could do everything by hand that JBuilder can do for me).