This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes problem in GridBagConstraints.fill Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "problem in GridBagConstraints.fill" Watch "problem in GridBagConstraints.fill" New topic

problem in GridBagConstraints.fill

Punit Jain
Ranch Hand

Joined: Aug 20, 2011
Posts: 1012
GridBagConstraints.fill is not working...
here is my code..

when i m maximizing my JFrame all of my components are coming to center they are not filling the horizontal space..
i mean instead of filling the remaining horizontal space they are coming to center with same size..
although i used

what i m doing wrong or what else i need to do to fill the horizontal space??
Darryl Burke

Joined: May 03, 2008
Posts: 4991

That's not what fill does. Read the API. Also read up on weightx and weighty.

luck, db
There are no new questions, but there may be new answers.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> Also read up on weightx and weighty.

he won't.

in his other topic exactly the same advice was given for exactly the same problem.
Don't get me started about those stupid light bulbs.
subject: problem in GridBagConstraints.fill
jQuery in Action, 3rd edition