File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Tutorial: GUI with Swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Tutorial: GUI with Swing" Watch "Tutorial: GUI with Swing" New topic
Author

Tutorial: GUI with Swing

Nicole Schmidt
Greenhorn

Joined: Jul 07, 2008
Posts: 5
Hi Java Guys,
I try to write a cool desktop app. But I find it really difficult to make a good GUI with swing. Does anybody know a good online Tutorial, or book (need not to be online)?
Regards.
Nicole
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

The one I know is.

http://www.jgoodies.com/freeware/looks/index.html


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42918
    
  68
The Swing Tutorial is a good start. The complete tutorial can also be downloaded. All the example codes for individual Swing features are here. A few more tutorials can be found here.

If you're just starting out with Swing I'd stay away from additional libraries like JGoodies.
[ August 03, 2008: Message edited by: Ulf Dittmer ]
Nicole Schmidt
Greenhorn

Joined: Jul 07, 2008
Posts: 5
I find it specially difficult to place my controls in a "nice" way on the panel. It always looks nasty.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42918
    
  68
Well, "nasty" is of course relative to your design sensibilities :-)

Generally, using an appropriate LayoutManager puts components into proper places. I find myself using BoxLayout and GridLayout a lot, possibly using a hierarchy of JPanels.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Go to Cai Horstmann's website and search for the GBC class designed for assistance getting GridBagLayout to work.
The classic tutorial about GridBag is here .
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1836
    
    7

If you're already familiar with the basics of Swing, I can recommend the book Filthy Rich Clients.
To quote directly from its preface: "This book is about building better, more effective and cooler desktop applications using graphical and animated effects". I found it to be an immensely fun and educational read!


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tutorial: GUI with Swing