• Post Reply Bookmark Topic Watch Topic
  • New Topic

GridBag layout versus Grid-, Flow- and other layouts  RSS feed

 
John Jaspers
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was curious as to whether using GridBag layout is the preferred way of laying out components. It seems that it's overkill for most GUIs, but I'm reading a book that says it is the most often used. In another book, it was said that it was mostly used by RAD programs.
So which is it? Can I do without it-for the most part-or should I learn it intimately?
Also, what are some good books for learning Swing?
[ June 18, 2003: Message edited by: John Jaspers ]
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

Also, what are some good books for learning Swing?

Personally, I really like Core JFC by Kim Topley.
Hope this helps.
Good Luck,
Avi.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All layouts have a proper use. Learn them all. If you code GUIs you will need them all sooner or later.
 
Garandi Garandi
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read about SpringLayout. java 1.4 feature, very useful. javax.swing.SpringLayout.
If you are doing GUI, knowing GridBagLayout, BorderLayout, BoxLayout, CardLayout and SpringLayout are important.
Garandi
 
Panagiotis Varlagas
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I like "Swing" by Robinson & Vorobiev (Manning); used to be free on the Net some time ago. Another good book was Zukowski's (not freely available).
 
Panagiotis Varlagas
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As per GridBag, there is nothing you can't do in Swing by using BorderLayout and GridBagLayout (OK, almost nothing . I used to use GridBag back in the VisualAge for Java days (VAJ had a nice visual composition editor - VCE which helped a lot). However, you _need_ to learn GridBag in depth. If you do expend the effort to do so, the reward will be immense; if you don't, then occasional hairpulling will outweigh any advantages.
My $0.02.
Panagiotis
SCJP (91%)
IBM Solution Developer for VisualAge for Java.
P.S. I wonder: Has anyone fiddled with VCEs replacement in WSAD 5.0 (JVE)? Any comments/initial reactions?
 
John Jaspers
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies, everyone.
I will use all the advice.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!