Ajay,
Weightx and Weighty can have any value.
You should consider them as proportions. Imagine that in your grid, you have three button in a row, called one , two, and three. Then you can legally set the weightx values for the three buttons respectively as 20,30, and 50. The compiler will not complain. All what this means is that at run time, the total value of the weightx values will be computed for that row( which is 100). Then the actual value of the weightx will be determined as a proportion of this value, thus for button button one it will be (20/100 = 0.2), for button two it will be ( 30/100 = 0.3) and for button three it will be (50/100 = 0.5).
You might want to write a small piece of code to convince yourself that the compiler will not balk for setting weightx values to 20,30,50 or any value. If it does, please let me know
Herbert.