For each column, the weight is related to the highest weightx specified for a component within that column, with each multicolumn component's weight being split somehow between the columns the component is in.
调试欢乐多
比如最小尺寸需要400像素的宽度才能显示组件。
但是容器宽度为600像素。这时GridBagLayout就要确定多余的200像素如何分配了
假如有三列,权值分别为20,40,50;
则第一列分配(20/(20+40+50))*200;
第二列分配(40/(20+40+50))*200
第三列分配(50/(20+40+50))*200
每一列的权值是根据这一列的最大权值确定
如这一列有三行,权值分别为20,30,40;
则这一列的权值为40”
我刚才看到了这个,一并给出,抛砖引玉。