开发者

Can I force automatic wrapping in BorderLayout

开发者 https://www.devze.com 2022-12-28 06:41 出处:网络
I was wondering if it is possible to force components in 开发者_C百科BorderLayout to wrap like they do in FlowLayout.When using a FlowLayout the components will wrap automatically. The problem is that

I was wondering if it is possible to force components in 开发者_C百科BorderLayout to wrap like they do in FlowLayout.


When using a FlowLayout the components will wrap automatically. The problem is that the height of the panel does not increase automaically, so you may never see the wrapped components. The Wrap Layout tries to address this issue.


BorderLayout, in principle, have only 5 positions: North, South, East, West and Center. If you want to micro-manage one of those positions, it is best that you put a JPanel there, and tweak its layout (e.g., set it to FlowLayout).

0

精彩评论

暂无评论...
验证码 换一张
取 消