aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes GridBagConstraints.weightx,weighty Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "GridBagConstraints.weightx,weighty" Watch "GridBagConstraints.weightx,weighty" New topic
Author

GridBagConstraints.weightx,weighty

sean cee
Ranch Hand

Joined: Oct 24, 2000
Posts: 115
Hi,
can someone tell me about GridBagConstraints.weightx,weighty in plain English so that I can understand..
Thanks guys

Sean <br />SCJP2, SCJP2p1.4, SCWCD
Milind Mahajan
Ranch Hand

Joined: Oct 23, 2000
Posts: 77
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
Viji Bharat
Ranch Hand

Joined: Sep 18, 2000
Posts: 101
I am assuming that gridx and gridy in Milind's post is a typo. It should have been weightx and weighty??
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GridBagConstraints.weightx,weighty