I have a List<JToggleButton> and I need to add all those buttons to a panel.
The panel needs to have only a vertical scrollbar. It has a fixed size of 600 x 600 px.
Buttons have different sizes and I need them look pretty compact (for example, some rows can have two big buttons, some four smaller). I need to add the buttons by order from list (first with index 0开发者_JS百科, then 1 and so on..).
How to achieve this layout?
You can try placing the JPanel with a FlowLayout in a JScrollPane and add all the buttons.
加载中,请稍侯......
精彩评论