title: draw a circle by passing jpanel component as argument
body: <p>I am really confused how to draw a circle on the jpanel by passing it as an argument..      </p>
  
  <pre><code>public class test extends JPanel{
  
          public test(JPanel jpanelcomponent) {
  
          }
          @Override
          protected void paintComponent(Graphics g) {
              // TODO Auto-generated method stub
              super.paintComponent(g);
              int width = getWidth()/2;
              int height = getHeight()/2;
              g.fillOval(5, 5, width, height);
          }
  
  
      }
  </code></pre>