Adding Jtree to Panel

Hi all,

I have a JTree in a scrollpane rendered with checkbox on each node. I

When I try adding to JFrame its displaying with scrollbar as expected. like this

frame.setContentPane(scrollPane);//working fine

But When I try adding to panel and try to display that its not working

JPanel panel =new JPanel();

panel.add(scrollPane);

frame.setContentPane(panel);// displaying tree without scrollbars

thanks,

sur

[566 byte] By [sur321a] at [2007-11-26 19:41:48]
# 1
scrollPane.setPreferredSize(new Dimension(x,y));where x,y can be the width/height of the frame
Michael_Dunna at 2007-7-9 22:23:21 > top of Java-index,Desktop,Core GUI APIs...
# 2
thanks micheal..
sur321a at 2007-7-9 22:23:21 > top of Java-index,Desktop,Core GUI APIs...