February 2014
Beginner
1248 pages
62h 25m
English
In Fig. 22.18, the effects of weighty and weightx cannot easily be seen until the container is resized and additional space becomes available. Components with larger weight values occupy more of the additional space than those with smaller weight values.
Components should be given nonzero positive weight values—otherwise they’ll “huddle” together in the middle of the container. Figure 22.20 shows the GUI of Fig. 22.18 with all weights set to zero.
Fig. 22.20 | GridBagLayout with the weights set to zero.
Read now
Unlock full access