Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Good tool for developing Swing based GUI

Reply
Thread Tools

Good tool for developing Swing based GUI

 
 
marcussilfver@gmail.com
Guest
Posts: n/a
 
      05-23-2007
I want to use Swing for developing the GUI of a web based poker game.

I downloaded Eclipse and cut'n pasted a Swing "hello world"
application (just for testing if Eclipse supports Swing). Swing is a
part of the J2EE standard, yes? Anyhow the application run correctly,
showing the Swing components.

My questions:

1) Should I go for some other tool than Eclipse to make my Swing GUI
developement easier?

2) I becomes kind of confused when I read on the net about plugins
that enhances Eclipse with Swing support. I guess they only mean a
plugin that adds the feature of drag'n dropping Swing components to
the workspace? Since compiling and running Swing seems to work fine.

3) Does Eclipse support building GUI:s by drag'n dropping buttons,
sliders etc on a workspace or do I have to get JBuilder to have that?
Coding it all by hand seems like to much work.

thanks

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      05-23-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
>I want to use Swing for developing the GUI of a web based poker game.
>
>I downloaded Eclipse and cut'n pasted a Swing "hello world"
>application (just for testing if Eclipse supports Swing). Swing is a
>part of the J2EE standard, yes?


No - J2SE. And J2EE is not so much a standard,
as a specification.
...
>1) Should I go for some other tool than Eclipse to make my Swing GUI
>developement easier?


Once you understand the AWT and Swing layouts,
I guess some of the D'n'D plug-ins might speed
GUI development.

>3) Does Eclipse support building GUI:s by drag'n dropping buttons,
>sliders etc on a workspace or do I have to get JBuilder to have that?


See <http://profectus.com.au/ee_programming_javaide.html>
for one developer's take on IDE's with a GUI builder. The
author prefers NetBeans/Matisse..

>Coding it all by hand seems like to much work.


Trying to create D'n'D GUI's before understanding
Java layouts will cause some angst, as well.

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.asp...neral/200705/1

 
Reply With Quote
 
 
 
 
SomeBloke
Guest
Posts: n/a
 
      05-23-2007
(E-Mail Removed) wrote:

> I want to use Swing for developing the GUI of a web based poker game.
>
> I downloaded Eclipse and cut'n pasted a Swing "hello world"
> application (just for testing if Eclipse supports Swing). Swing is a
> part of the J2EE standard, yes? Anyhow the application run correctly,
> showing the Swing components.
>
> My questions:
>
> 1) Should I go for some other tool than Eclipse to make my Swing GUI
> developement easier?
>
> 2) I becomes kind of confused when I read on the net about plugins
> that enhances Eclipse with Swing support. I guess they only mean a
> plugin that adds the feature of drag'n dropping Swing components to
> the workspace? Since compiling and running Swing seems to work fine.
>
> 3) Does Eclipse support building GUI:s by drag'n dropping buttons,
> sliders etc on a workspace or do I have to get JBuilder to have that?
> Coding it all by hand seems like to much work.
>
> thanks


Eclipse has a visual editor plugin that can be installed by going to
Help/Software Updates/Find and install. This may be what you are looking
for.

Hope this helps,

Tim.
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      05-23-2007
Andrew Thompson wrote:

>...J2EE is not so much a standard,
>as a specification.


Silly me, no. J2EE *is* a standard that includes
a variety of specs. ..Oops!

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.asp...neral/200705/1

 
Reply With Quote
 
Thomas Kellerer
Guest
Posts: n/a
 
      05-23-2007


On 23.05.2007 12:44 Andrew Thompson wrote:
> Andrew Thompson wrote:
>
>> ...J2EE is not so much a standard,
>> as a specification.

>
> Silly me, no. J2EE *is* a standard that includes
> a variety of specs. ..Oops!
>

No you were right
The standard is JavaEE, it's no longer called J2EE

Thomas

 
Reply With Quote
 
Bent C Dalager
Guest
Posts: n/a
 
      05-23-2007
In article <(E-Mail Removed) .com>,
<(E-Mail Removed)> wrote:
>I want to use Swing for developing the GUI of a web based poker game.
>
>I downloaded Eclipse and cut'n pasted a Swing "hello world"
>application (just for testing if Eclipse supports Swing). Swing is a
>part of the J2EE standard, yes? Anyhow the application run correctly,
>showing the Swing components.
>
>My questions:
>
>1) Should I go for some other tool than Eclipse to make my Swing GUI
>developement easier?


If you aren't familiar with Swing and its component layout system,
then you should use some drag-and-drop type GUI design tool in order
to learn. I don't know what Eclipse offers for this. JBuilder was very
good back when I was learning this.

If you _are_ familiar with Swing, then you're probably better off
doing it by hand as this allows you to write properly factored GUI
setup code. Automated tools tend to make a mess out of things. If you
are aiming for a very artsy GUI for the poker game, you are probably
also better off doing it by hand and possibly writing your own layout
manager. Which I am told isn't difficult.

>2) I becomes kind of confused when I read on the net about plugins
>that enhances Eclipse with Swing support. I guess they only mean a
>plugin that adds the feature of drag'n dropping Swing components to
>the workspace? Since compiling and running Swing seems to work fine.


I expect you are right. Java Swing is part of the J2SE that you will
already have and so you can run Swing applications from Eclipse out of
the box.

>3) Does Eclipse support building GUI:s by drag'n dropping buttons,
>sliders etc on a workspace or do I have to get JBuilder to have that?
>Coding it all by hand seems like to much work.


Hand-coding GUIs isn't a lot of work, but depending on what layout
manager you are using, it may be very confusing and unsatisfying
unless you're very familiar with that particular layout manager. In
particular, trying to manually set gridbaglayout constraints is an
exercise in frustration for the beginner (that is not a layout manager
I would recommend at any rate but it seems popular enough).

The main benefit in hand coding is that you can write GUI layout code
that is actually readable and maintainable into the future as well as
being properly modular. Also, it can be considerably faster than
fiddling around with dragging, dropping, pulling and whatnot with the
components in a GUI builder. But you do need to know what you're
doing for this to be a workable approach.

Cheers
Bent D
--
Bent Dalager - (E-Mail Removed) - http://www.pvv.org/~bcd
powered by emacs
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      05-23-2007
Bent C Dalager wrote:
> If you aren't familiar with Swing and its component layout system,


That should be if you /are/ familiar with Swing then use a GUI.

> then you should use some drag-and-drop type GUI design tool in order
> to learn. I don't know what Eclipse offers for this. JBuilder was very
> good back when I was learning this.
>
> If you _are_ familiar with Swing, then you're probably better off
> doing it by hand as this allows you to write properly factored GUI


If you are /not/ familiar with Swing then you should do it by hand until you
are or you won't understand anything.

> setup code. Automated tools tend to make a mess out of things. If you


Automated tools make a mess out of things for people who don't know how to do
it by hand. They are very useful once you understand what they are automating.

> are aiming for a very artsy GUI for the poker game, you are probably
> also better off doing it by hand and possibly writing your own layout
> manager. Which I am told isn't difficult.


Some people relate to code better, some to visual metaphors when writing GUI
code. Either way, doing it by hand first will teach you what's happening,
otherwise you have no control with either the hand-coding or the GUI-tool
approach.

> Hand-coding GUIs isn't a lot of work, but depending on what layout


Nor is GUI-coding, if you have some hand-coding experience to inform your work.

> manager you are using, it may be very confusing and unsatisfying
> unless you're very familiar with that particular layout manager. In
> particular, trying to manually set gridbaglayout constraints is an
> exercise in frustration for the beginner (that is not a layout manager
> I would recommend at any rate but it seems popular enough).


Check out the Swing tutorial on java.sun.com.

> The main benefit in hand coding is that you can write GUI layout code
> that is actually readable and maintainable into the future as well as
> being properly modular. Also, it can be considerably faster than
> fiddling around with dragging, dropping, pulling and whatnot with the
> components in a GUI builder. But you do need to know what you're
> doing for this to be a workable approach.


You need to know what you're doing to use any approach.

For many people who understand Swing programming, using a GUI tool enhances
productivity. It's impossible to know in one's own case until one has tried
it both ways. Coding the text first as one is learning often helps master the
details; certainly reviewing any GUI-generated code to achieve full
understanding is a necessity.

--
Lew
 
Reply With Quote
 
Bent C Dalager
Guest
Posts: n/a
 
      05-23-2007
In article <(E-Mail Removed)>,
Lew <(E-Mail Removed)> wrote:
>
>If you are /not/ familiar with Swing then you should do it by hand until you
>are or you won't understand anything.


Having used the exact opposite approach, I would say this is wrong. Of
course, if you steer well clear of gridbaglayout and use a layout
manager with more intuitive constraints objects it might be correct.

>> setup code. Automated tools tend to make a mess out of things. If you

>
>Automated tools make a mess out of things for people who don't know how to do
>it by hand. They are very useful once you understand what they are automating.


Having all my GUI initialization code in one single mammoth block of
code is what I call a mess. This is what JBuilder does, I'm not
familiar with the competition.

>> are aiming for a very artsy GUI for the poker game, you are probably
>> also better off doing it by hand and possibly writing your own layout
>> manager. Which I am told isn't difficult.

>
>Some people relate to code better, some to visual metaphors when writing GUI
>code.


I am not sure what you are trying to say.

> Either way, doing it by hand first will teach you what's happening,
>otherwise you have no control with either the hand-coding or the GUI-tool
>approach.


If you are actually _trying_ to learn how it works, then using a GUI
editor is a perfectly good tool to do so. At least, it is if it does
what JBuilder does and produces source code that is somewhat readable
so you can see how it's doing its stuff. If you're not really trying,
of course, then you're not going to learn anything in any case.

>> Hand-coding GUIs isn't a lot of work, but depending on what layout

>
>Nor is GUI-coding, if you have some hand-coding experience to inform your work.


I find GUI helpers to be more about fiddling around than about being
effecient. I get the same job done in either case, but writing by hand
takes me far less time than the point-and-click approach.

There might of course be some special highly verbose activities that
are faster with point-and-click, such as creating event handlers
perhaps, or creating new events to fire off from your class. I am
mostly thinking of component placement and layout when I say that
hand-written is faster.

>> The main benefit in hand coding is that you can write GUI layout code
>> that is actually readable and maintainable into the future as well as
>> being properly modular. Also, it can be considerably faster than
>> fiddling around with dragging, dropping, pulling and whatnot with the
>> components in a GUI builder. But you do need to know what you're
>> doing for this to be a workable approach.

>
>You need to know what you're doing to use any approach.


Not really. JBuilder lets you plonk down your components where you
want them to be and will do a semi-decent job of cleaning up your GUI
and converting it to the layout manager of your choice. The result may
not be the image of perfection (if memory serves, the result doesn't
always resize very gracefully), but depending on your requirements it
can be perfectly servicable.

Cheers
Bent D
--
Bent Dalager - (E-Mail Removed) - http://www.pvv.org/~bcd
powered by emacs
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      05-23-2007
Lew wrote:
>> Some people relate to code better, some to visual metaphors when writing GUI
>> code.


Bent C Dalager wrote:
> I am not sure what you are trying to say.


I am saying that some programmers are more comfortable with writing code in a
text editor and some with GUI tools. It's a matter of cognitive style. It's
not so much whether one is better but whether it's better for a particular
individual.

>> Either way, doing it by hand first will teach you what's happening,
>> otherwise you have no control with either the hand-coding or the GUI-tool
>> approach.

>
> If you are actually _trying_ to learn how it works, then using a GUI
> editor is a perfectly good tool to do so. At least, it is if it does
> what JBuilder does and produces source code that is somewhat readable
> so you can see how it's doing its stuff. If you're not really trying,
> of course, then you're not going to learn anything in any case.


I do agree with you. I think it's important to really understand code in the
editor and not just blindly rely on the GUI generator. Your example of a
"mess" is a reason - in your case understanding the GUI led you to use it less.

I see what you mean by GUI-generated code being messy.

>>> Hand-coding GUIs isn't a lot of work, but depending on what layout

>> Nor is GUI-coding, if you have some hand-coding experience to inform your work.

>
> I find GUI helpers to be more about fiddling around than about being
> effecient. I get the same job done in either case, but writing by hand
> takes me far less time than the point-and-click approach.


So the editor provides a better impedance match to your cognitive style.

For the record, I tend to be more comfortable in an editor than in a GUI tool
myself.

>> You need to know what you're doing to use any approach.


> Not really. JBuilder lets you plonk down your components where you
> want them to be and will do a semi-decent job of cleaning up your GUI
> and converting it to the layout manager of your choice. The result may
> not be the image of perfection (if memory serves, the result doesn't
> always resize very gracefully), but depending on your requirements it
> can be perfectly servicable.


It is dangerously irresponsible to advocate that programmers not understand
what they're doing.

It isn't about whether GUI tools let you ignore what you know but whether you
have the knowledge in the first place. I have far too much experience working
with so-called "developers" who know a tool (like Matisse [in NetBeans,
another fine IDE] or Struts) but are clueless when it comes to what the tool
does.

Knowledge is power and deliberate ignorance in this profession is a sin.

People content to use GUI tools to write Swing apps without knowing what is
going on are certainly not programmers, and should not be permitted to collect
paychecks as programmers.

--
Lew
 
Reply With Quote
 
Bent C Dalager
Guest
Posts: n/a
 
      05-23-2007
In article <(E-Mail Removed)>,
Lew <(E-Mail Removed)> wrote:
>> Not really. JBuilder lets you plonk down your components where you
>> want them to be and will do a semi-decent job of cleaning up your GUI
>> and converting it to the layout manager of your choice. The result may
>> not be the image of perfection (if memory serves, the result doesn't
>> always resize very gracefully), but depending on your requirements it
>> can be perfectly servicable.

>
>It is dangerously irresponsible to advocate that programmers not understand
>what they're doing.
>
>It isn't about whether GUI tools let you ignore what you know but whether you
>have the knowledge in the first place. I have far too much experience working
>with so-called "developers" who know a tool (like Matisse [in NetBeans,
>another fine IDE] or Struts) but are clueless when it comes to what the tool
>does.
>
>Knowledge is power and deliberate ignorance in this profession is a sin.
>
>People content to use GUI tools to write Swing apps without knowing what is
>going on are certainly not programmers, and should not be permitted to collect
>paychecks as programmers.


I don't really know what the OP's situation is, but I am guessing that
the poker software is some sort of hobby project. As such, I don't
think little things like not entirely understanding what goes on
should hold him back. GUI-design the GUI and get on with things.
Later, perhaps he will develop more of an understanding of what is
actually happening with that code and clean it up some way or other. I
find this a perfectly reasonable approach for non-professional
projects.

For professional projects, you either have to know exactly what you're
doing all the time (typically the case in small shops) or else you
need to have procedures in place that help ensure the continuing high
quality of the system in the face of having rookies in training and
such around. Assuming the latter, then, again, it is perfectly
acceptable to have the rookie blunder about with the GUI design tool
because you're going to have a QA program in place that takes this
into account and ensures both that he doesn't get to check in rubbish
code and also that he'll improve as a programmer in the process.

Cheers
Bent D
--
Bent Dalager - (E-Mail Removed) - http://www.pvv.org/~bcd
powered by emacs
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wgy isn't there a good RAD Gui tool fo python Ivan Kljaic Python 45 07-13-2011 02:59 PM
looking for a light weighted library/tool to write simple GUI abovethe text based application petr.jakes.tpc@gmail.com Python 10 03-07-2008 09:05 PM
gui developing Mage Python 15 04-24-2005 11:44 AM
Developing a simple GUI Shamli C Programming 9 12-11-2003 04:46 PM
Re: python based tools for developing web-based apps Alex Martelli Python 0 08-18-2003 12:26 PM



Advertisments