• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tutorial: GUI with Swing

 
Nicole Schmidt
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1324
Android Java Windows
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find it specially difficult to place my controls in a "nice" way on the panel. It always looks nasty.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 49793
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic