JScrollPane
Hi
I am trying to make a JPanel which is added in a Container getContentPane.
In the JPanel there are so many JLabels that these are exceeding the size of the JFrame. I therefore wants to add a ScrollPane in the JPanel.Can ANy one suggest me how can i make it possible.?
Thankx
[302 byte] By [
john8921a] at [2007-11-27 9:12:16]

# 3
> Its not working
looks like nothing has a size
try it like this
jp4 = new JPanel();
jp4.setPreferredSize(new Dimension(400,300));//<
jp4.setLayout(null);
JScrollPane jSP=new JScrollPane(jp4);
jSP.setAutoscrolls(true);
getContentPane().add(jSP);
setSize(200,200);//<