• Post Reply Bookmark Topic Watch Topic
  • New Topic

question about GridBagConstraints

 
Jack Deng
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got problems in GridBagConstraints, no matter I set the gridY value to be, the compoents always place on the middle of Frame, can anybody help me, I want to place the component start from the upper left corner Screen(0.0) position. thanks !!!
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everything in a GridBagLayout is clumped in the center of the container unless you allow the components to disperse into the available space. You do this by setting weighty and weightx to non–zero values.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!