aspose file tools
The moose likes Swing / AWT / SWT / JFace and the fly likes Struggling to Learn Java GUI. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "Struggling to Learn Java GUI." Watch "Struggling to Learn Java GUI." New topic
Author

Struggling to Learn Java GUI.

Mo Jay
Ranch Hand

Joined: Feb 16, 2009
Posts: 83
Hello everyone,

I just would like to ask about Java GUI especially Swing and how to get a handle of it.

I have been trying to use Swing and Awt on and off for quiet sometime now however I never got a good grasp of them, I want to know what's the best way to learn Swing with regard to the resources (books and materials) used and also the methods conducted (ex. do I have to remember all the syntax of those Swing API or just the concept).

Let me know what you think and also share your experience of learning Java GUI and how you did it.

Thank you in advance,
MJ
Michael Dunn
Rancher

Joined: Jun 09, 2003
Posts: 4041
I'd like to play golf like Tiger Woods.

No amount of reading books or listening to people's advice will get me what I want.

only practice, practice, practice, will get me on the way, and when I think I'm done, practice some more.

in Swing, 'practice' equates to writing code.

Pierre Sugar
Ranch Hand

Joined: Dec 08, 2002
Posts: 62

The easy way would be downloading Netbeans IDE at http://www.netbeans.org/downloads/ and designing your GUI with the integrated GUI builder Matisse. Afterwards you can view the generated source code.

If you would rather learn from scatch a good point to start is at http://java.sun.com/docs/books/tutorial/ui/index.html.

Have fun.


Pierre
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 26710
Pierre Sugar wrote:The easy way would be downloading Netbeans IDE at http://www.netbeans.org/downloads/ and designing your GUI with the integrated GUI builder Matisse.
Disagree. You will never understand what is going on from Matisse. Write the code by hand until you are familiar with Swing.
Michael Dunn
Rancher

Joined: Jun 09, 2003
Posts: 4041
> The easy way would be downloading Netbeans IDE

that's the worst way to try and learn swing.

learners shouldn't even use an IDE with autocomplete,
the more they have to recall from memory, the quicker they will learn

a basic IDE, with a good 'help' link to the java apidocs, is all that is needed
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Pierre Sugar wrote:The easy way would be downloading Netbeans IDE at http://www.netbeans.org/downloads/ and designing your GUI with the integrated GUI builder Matisse. Afterwards you can view the generated source code.

I'll agree with the others as the generated code is ugly and nothing really you can learn from. I liken using NetBeans to generate Swing code like ordering Pizza to be delivered. Your meal is ready quick, and it tastes pretty good too, but don't expect that by ordering your pizza you'll learn to cook.
Pierre Sugar
Ranch Hand

Joined: Dec 08, 2002
Posts: 62

O.k. you convinced me, it wasn't a good idea to suggest using Matisse for to learn Swing. Yes I also do agree that it is not a good idea to try to learn to build Swing applications by looking at the generated code from Matisse.

Therefor I would rather suggest that you look at the Swing tutorials or use a book like "graphic Java" from David M. Geary or "core Java" from Horstmann and Cornell. This is the way I started with Swing and it helped me a lot. I still use it to look up certain things, even the books I have are from year 2000. Another book I frequently use is "Java look and feel design guide lines".
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 26710
Pierre Sugar wrote:. . ."core Java" from Horstmann and Cornell. . . .
An excellent book
Mo Jay
Ranch Hand

Joined: Feb 16, 2009
Posts: 83
Hello everyone,

I would like to thank you all for the replies and advices you guys posted for this question.

I agree with the most of you that Swing and GUI in general needs to be learned from scratch and through continuous practice, I am also against the idea of depending on NetBeans or any IDE that will generate the code for you because you will never understand the how and why behind it.

I appreciate your feedbacks.

MJ


Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 26710
You're welcome
 
IntelliJ Java IDE
 
subject: Struggling to Learn Java GUI.
 
Threads others viewed
Should I select Swing or SWT ?
Does SCJP 1.6 exam include questions about GUI classes?
Swing Redundant ?
New Task
please guide !
developer file tools