Hellow =)
well.. it's pretty much as the title says
I've made a JPanel.. in which I let the user add some buttons
I've set that panel to null layout so I could nicely order them buttons (tried with girdbaglayout but couldn't figure that out)
and now I need scrollbars in the panel for when the user adds more buttons.. than the panel can show
I've googled some aruond and eventually got the scrollbars to show and they even seem to work..
but when I add more buttons the scrollbars don't change to be able to scroll around more.. they just stay the same size as they were when the applet launches
here's how I configured the panel and scrollpane..
JPanel chartPanel = new JPanel();
JScrollPane scroll = new JScrollPane(chartPanel);
chartPanel.setLayout(null);
chartPanel.setPreferredSize(new Dimension(getWidth(), getHeight()));
scroll.setBounds(2, 2, getWidth(), getHeight());
add(scroll);
Message was edited by:
Nizzle