Problem with adding scroll bar on panel
i have created a frame in which i have added a JPanel. i need to add scroll bar to this frame. for this i used the following code:
i am not getting a scrollpane on my panel by using this code. what is the error with it?
JFrame Myframe = new JFrame();
JPanel p1 = new JPanel();
JSrollPane scrollpane = new JScrollpane(p1);