java - Swing layouts combine box and flow -


I use a panel with box layout and then add a panel with a flyleigh so that when I want to break the line Can I ... but reduce the space between flow-line panels in the idak box layout:

  JPN search = new JPNL (); Boxleigh bl = New Box Layout (Search, BoxLayout.Y_AXIS); Search.setLayout (BL);  

What method do I use to reduce space?

a box layout to increase / shrink panel based on available space Try to override the getMaximumSize () method of the panel to return the preferred size of the panel.

@ Override Public Dimensions getMaximumSize () {getPreferredSize ()); }

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -