title: Paint Method within an ActionListener
body: <p>I am trying to use the Java paint method within an ActionListener. However, when paint is placed within the ActionListener, my compiler throws errors, and eclipse does not recognize paint as a method at all, despite importing java.awt.geom.*; </p>
  
  <pre><code>private class NumHandler implements ActionListener
  {
      public void actionPerformed(ActionEvent e)
      {
                //Draw Ovals
                public void paint (Graphics g)
                {
                     int number;
                     int x = 10;
                     int y = 30;
                     int width = 20;
                     int height = 10;
  
                     number = Integer.parseInt(numberTF.getText());
  
                     for (int i = 0; i &lt; number; i++)
                     {
                          g.drawOval(x, y, width, height);
  
                          x += 5;
                          y += 5;
                          width += 5;
                          height += 5;
                     }
                }
      }
  
  }
  </code></pre>