swing flow layout break element

前端 未结 5 1743
清歌不尽
清歌不尽 2020-12-18 21:40

I have panel which is using flow layout.

How can I make break in flow layout? Like
in html. Some special break element or another trick to i

5条回答
  •  爱一瞬间的悲伤
    2020-12-18 22:17

    I'd make multiple placeholder panels with no insets, and then use some code to work out when a component needs to be moved to the next panel because it's below a minimum width threshold. It's ugly, but it should work. You'd need to do all the removal and addition by hand, and within the EDT.

提交回复
热议问题