开发者

Add a List<JToogleButton> to a JPanel

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜