This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Can wightx and wighty be > 1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Can wightx and wighty be > 1" Watch "Can wightx and wighty be > 1" New topic

Can wightx and wighty be > 1

Kourosh Keshavarzi
Ranch Hand

Joined: Oct 23, 2000
Posts: 66
In this one simmulation of the effects of gridbagconstraints I saw that you can they only used values from 0.0 or 1.0 (like 0.2). But in a program I saw 2,3,and 4 used. Can wightx be greater than 1. Whats the range? How does it deam with negetive
satishind Reddy
Ranch Hand

Joined: Oct 17, 2000
Posts: 33
You cannot have weightx, wieghty value greater than 0ne 1.0. if any one mention in program it may be percent of weightx and percent of weighty.
hope cleared...
Aru Ven
Ranch Hand

Joined: Sep 28, 2000
Posts: 199
Satish, Kourosh,
The default value of this field is 0. weightx should be a non-negative value. The API never states that weightx & weighty should never be greater that 1.0.
It is sorta covered in the JavaRanch Style Guide.
subject: Can wightx and wighty be > 1