• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI Layout - GridBagLayout

 
Ian Hamilton
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've just read a post on JavaRanch from 2002 which stated GridBagLayout is the most flexible layout manager, is this still true?

I've been looking at BoxLayout but will concentrate on GridBagLayout if it has limitations.

I've found a Borland demo here for GridBagLayout if anyones interested..
http://info.borland.com/techpubs/jbuilder/jbuilder9/designui/gridbaglayout/intro.html
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should not limit yourself to a single LayoutManager, that's a completely incorrect way to approach your interface design.

I've used FlowLayout, GridLayout, BorderLayout, and BoxLayout in my user interfaces.
Any one of them on its own couldn't have achieved the effect I was looking for, together they do what I want.
 
Ian Hamilton
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you - I'm new to Swing so still exploring.
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Thats true, you can do a lot o stuff with the GridBagLayout but unfortunately is a little bit complex and hard to understand (this if I compare it with the other layout managers).
I use it a lot but you can do the same stuff using the other 4-5 standatd layout managers.

Regarsd,
Mihai
[ May 18, 2006: Message edited by: Mihai Radulescu ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic