[英]Positioning using GridBagLayout
As you can see in my output below, the label is displayed on top of my "next piece" grid. 正如您在下面的输出中所看到的,标签显示在我的“下一个”网格的顶部。 I know why this is happening (because my grid bag constraints are at the same location) but if I increase the y component of these constraints, my "next piece" grid is moved the the y coordinate after the larger grid.
我知道为什么会发生这种情况(因为我的网格包约束在同一个位置)但是如果我增加这些约束的y分量,我的“下一个”网格将移动到更大网格后面的y坐标。 I would like to have the "next piece" grid where it is with the label right over top of it.
我希望有一个“下一块”网格,标签就在它的顶部。
Any suggestions? 有什么建议么?
Either 或
gridheight
property of GridBagConstraints
(for the other two components right of the problem area) GridBagConstraints
的gridheight
属性(对于问题区域右边的其他两个组件)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.