Can't make JScrollPane work
Hello!
I'm just trying to make this have those things that you can scroll with.
Here is my code, it's retty close to a exemple code from a O'reilly book but I can't make it work.
(In case it's important DrawingArea extends JPanel)
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import java.awt.Color;
publicclass SlidingWindows{
publicstaticvoid main(String[] args){
JFrame frame =new JFrame("Sliding windows" );
DrawingArea pane =new DrawingArea();
JScrollPane scroll =new JScrollPane(pane);
frame.getContentPane().add( scroll );
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
frame.setSize( 500, 200 );
frame.setVisible(true );
}
}

