Hello,
I have a JPanel with a variable number of JButtons (with an Image in it).
There are more buttons than the screen can show, so I want to make a
scrollpane.where I can scroll through al JButtons (vertically). There should
be as many Jbuttons on the screen as possble (thus in a grid).
How can I do this?
Currently I can show the scrollbar, but the buttons are in a single col or
row.
// make the panel
overviewPanel = new JPanel();
JScrollPane myScrollPane= new JScrollPane(overviewPanel );
//
for (int i=0;i<20;i++) {
overviewPanel.add(new JButton());
}
greetings
Hal Rosser - 13 Jun 2004 07:50 GMT
Try using the JTabbedPane - or a JComboBox
> Hello,
>
[quoted text clipped - 18 lines]
>
> greetings