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

GridBag Layout Problem

Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
I am currently creating an application that uses nested layouts to create a complex input form. So far everyting has functioned as expected until now. I post an image of what is occuring
and here is the excerpt of code producing the strange behaviour


I hope you understand my query. I can post more code or screenshot if necessary.

regards
Nigel
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
I'm not sure why it's not working for you, not a GridbagLayout guru. I might suggest trying JGoodies forms if you can. You can download the library here. It took less time for me on one project to change everything to the JGoodies forms than it would have taken me to fix the GBL problems I was having, and I ended up happier with the GUI when I was done.
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
To clarify further the setGbc method has the following argument list
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Solved it I forgot to add the GridBagConstraints when added the panel.
:roll:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GridBag Layout Problem