I am trying to add a scrollpane to my frame and get the exception as trying to add window to a container I don't know how to add scroll bar to a container Can any one pls give me some sample code to start I will be highly thankful
SCJP,SCWCD,SCBCD<br />If Opportunity doesn't knock then build the door
This should also work. Just add the following lines after all the components have been added to your JFrame -
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Jun 09, 2000
Thanks for replying but can you tell me if I make my content pane as JScrollpane then which layout should I use Can I use Box Layout in that case? I try to add on this pane and nothing comes on frame, neither scroll bar not components