File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes GUI Layout - GridBagLayout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "GUI Layout - GridBagLayout" Watch "GUI Layout - GridBagLayout" New topic
Author

GUI Layout - GridBagLayout

Ian Hamilton
Ranch Hand

Joined: May 02, 2006
Posts: 37
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

Joined: Apr 21, 2006
Posts: 1847
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.


42
Ian Hamilton
Ranch Hand

Joined: May 02, 2006
Posts: 37
Thank you - I'm new to Swing so still exploring.
Mihai Radulescu
Ranch Hand

Joined: Sep 18, 2003
Posts: 918

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 ]

SCJP, SCJD, SCWCD, OCPJBCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GUI Layout - GridBagLayout