In Swing GUI development, do you code by yourself or use power tools?

W

www

Hi,

In writing Swing GUI programs, I have seen people write the code line by
line. I also found that there are a number of Swing GUI development
tools available (some are free, some are not). Using those tools, you
just need to drag a button, drop to the client platform, etc. And code
will be generated for you automatically.

I am curious what is advantage/disadvantage for the two choices.

Actually, my project leader use the first method - code line by line.
The GUI he developed is not trivial. Now we need to make some
modification to the GUI. I have to code line by line, correct?

How about JavaBeans? JavaBeans is almost never talked in most Java
Books. But occasionally, I saw it is used. Is JavaBeasn commonly used?

Thank you.
 
D

David Segall

www said:
Hi,

In writing Swing GUI programs, I have seen people write the code line by
line. I also found that there are a number of Swing GUI development
tools available (some are free, some are not). Using those tools, you
just need to drag a button, drop to the client platform, etc. And code
will be generated for you automatically.
That's the advantage. Using the latest version of NetBeans you can
generate a single screen which is as complicated as any user could
cope with, and that resizes correctly, in an hour.
Actually, my project leader use the first method - code line by line.
The GUI he developed is not trivial. Now we need to make some
modification to the GUI. I have to code line by line, correct?
That's the disadvantage. None of the GUI builders can reverse engineer
existing code and all of them store the extra information they need in
different formats so you cannot create a screen using one tool and
change it using another. It is likely that the code generated by a GUI
builder is more difficult to read and alter "line by line" than code
that was written with this in mind.

P.S. I assume your email address is false so, unless you want to
punish the folks at nospam.com, I suggest you change it to something
that really does not exist. A TLD of .invalid is recommended in
RFC2606 <http://www.faqs.org/rfcs/rfc2606.html>
 
K

Kai Schwebke

[GUI Builder]
I am curious what is advantage/disadvantage for the two choices.

With current GUI builders (like Matisse from Netbeans) you can create
nice GUIs whith full geometry management in a very short time.

As Dave statet, they can't reverse engineer existing code, or continue
to work with code you have modified outside the builder. So you have to
stick to the hooks provided by the tool implementing the GUI.

I revert to hand craftet GUIs only if the GUI itself depends on
parameters (e.g. a number of checkboxes and labels not known a priori).
Even here a first version of the GUI can be created by a builder.


Kai
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top