Can I force automatic wrapping in BorderLayout
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).
精彩评论