Note that the same info is still available online as part of the new
GUI Tutorial, which emphasizes Swing, but still covers some AWT classes like LayoutManagers because Swing itself still uses AWT LayoutManagers. The GridBagConstraints part is
here.
Although the tutorial says
generally weight values are from 0.0 to 1.0, the actual limits are somewhat wider. Since weights are represented by doubles, it's possible to put in any value from -Double.MAX_VALUE to +Double.MAX_VALUE (i.e. -1.8E308 to +1.8E308). However, any negative values are treated exactly as if they were zero - it's possible, but completely useless. On the other hand, values greater than 1.0 certainly are possible and have a notable effect - a weight of 2.0 gets twice as much space as a weight of 1.0.
Note also that the API says nothing about 1.0 being any sort of maximum; it's just a convention used by a lot of people. I've never seen any example where 100.0 is the "maximum", but that's no less valid than choosing 1.0 as the "maximum". It doesn't matter whether you use weights of 0.0, 0.1, 0.5 and 1.0, or 0.0, 10.0, 50.0, and 100.0 - or even 0.0, 1E100, 5E100, and 1E101. All that matters is that you make sure the ratios are what you want them to be.
So - I think the best answer is 0.0 to Double.MAX_VALUE. If it's multiple choice and that's not available, go with 0.0 to 1.0, or -Double.MAX_VALUE to Double.MAX_VALUE (depending whether they ask for "possible values" or "typical values").
[This message has been edited by Jim Yingst (edited February 24, 2000).]