JScrollPane with many components.
843805Oct 27 2006 — edited Oct 30 2006To wrap a component inside a scrollpanel, I've only to do (for example):
scrollPane=new JScrollPane(a_textArea_for_Example);
So I though that to put a list of labels and buttons, I had to put them in a panel, and then do
scrollPane=new JScrollPane(the_panel);
This works when the scrollpanel size is greater than panel, if not the panel part inide the scroll is painted correctly, the panel part outside the scroll is painted outside too!!! and with scrollbars working well.
To put many component in a scrollpanel which is the correct way to do it?
Why a panel inside a scrollpanel is not working properly?
I've only created a panel, setlayout to an XYLayout, put some labels inside, and create scrollPane in the normal way scrollPane=new JScrollPane(the_panel);
What's wrong?