Graphics dont appear
<p>Whatever I do, I can not display rectangle/line/oval on the screen. I checked other sources where they paint graphics, but when I even execute those codes, I don't get any graphics displayed on the windows. Below is the example from the text book. </p>

<pre><code>import java.awt.*;
import javax.swing.*;

class PlotGraph
{
   public static void main (String [] args) {
    JFrame win;
    Container contentPane;
    Graphics g;

    win = new JFrame("testing");
    win.setSize(300,200);
    win.setLocation(100,100);
    win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    win.setVisible(true);

    contentPane = win.getContentPane();
    g = contentPane.getGraphics();

    g.drawRect(10, 30, 50, 50); 

   }

}
</code></pre>
