File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in GridBagConstraints.fill

 
Punit Jain
Ranch Hand
Posts: 1012
2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not what fill does. Read the API. Also read up on weightx and weighty.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic