Issue with this simple code
<pre><code>import java.awt.Color;
import java.awt.Graphics;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class MyDrawPanel extends JPanel{
    public void paintComponents(Graphics g){
        g.setColor(Color.orange);
        g.fillRect(20,50,100,100);
    }
    public static void main(String[] args){
        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(500, 500);
        frame.getContentPane().add(paintComponents(g));
        frame.setVisible(true);
    }
}
</code></pre>

<p>I think I should add something arguments in <code>frame.getContentPane().add(paintComponents(g));</code>.
I looked up <code>Graphics</code> class but I'm still struggling with it. What should be the parameter of it?</p>
