Win a copy of Spring in Action (5th edition) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

GridBagConstraints.weightx,weighty  RSS feed

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
can someone tell me about GridBagConstraints.weightx,weighty in plain English so that I can understand..
Thanks guys
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sean,
The gridx and gridy fileds of GridBagConstraints class control resizing of a component. Meaning that if, because of some circumstances, the size of the container changes, then the change in size id distributed on the components proportional to their weightx and weighty values. The default value is 0.0 (weightx and weighty are of type double) indicating that no resizing will be done for the components if conatiner is resized. This is the basic function of weightx and weighty.
Thanks.
Milind
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am assuming that gridx and gridy in Milind's post is a typo. It should have been weightx and weighty??
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!