0

I've made a simple GUI with 2 lines of checkboxes. The checkboxes are all the same size. When I maximize the application, they are anchored on the left so it looks a bit out of place.

I would like to have the checkboxes slowly move to the first line if there is space. Similar to the way 'float' works in CSS (on websites).

Does Swing have this type of functionality?

4

2 回答 2

2

类似于“浮动”在 CSS 中的工作方式(在网站上)。

寻找FlowLayout那个效果。

于 2013-06-11T19:48:51.767 回答
2

查看适用于许多情况的Wrap Layout 。

于 2013-06-11T19:52:33.517 回答