我把一個TileGroup放在BorderContainer中,並將寬度設置爲100%,但TileGroup中的內容沒有填充父容器,它在右邊留下了一大塊空白。TileGroup不填充容器
的代碼是:
<s:BorderContainer width="100%" height="100%">
<s:TileGroup width="100%" requestedColumnCount="2">
<s:Button>
button1
</s:Button>
<s:Button>
button2
</s:Button>
<s:Button>
button3
</s:Button>
</s:TileGroup>
</s:BorderContainer>
,結果是這樣的:
http://i.minus.com/iN39P7Us4cBm1.png
寬度已被設置爲100%,但它不工作。
有沒有什麼辦法讓TileGroup像GridLayout那樣在Java swing中填充容器?
http://www.java2s.com/Code/JavaImages/GridLayoutPane.PNG
非常感謝你。
它的工作原理。非常感謝:) –