java - Panel with JScrollPane - Maintain preferred height for components -


i have mainpanel jscrollpane. has single button inside fixed height.

the height of mainpanel should fixed @ 3 times height of button.

so, mainpanel should button , amount of free space below button.

now, dynamically add buttons mainpanel have added vertically , after 3 buttons scrollbars have kick in.

which layout manager should use mainpanel achieve effect?


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -