title: Java JComponent.getGraphics() always returns null
body: <p>I am trying to an object that functions as a button but uses images for display. My problem is that when call <code>getGraphics()</code> it returns <code>null</code>. I have been searching allover the place and cannot find why?</p>
  
  <p>My code for the constructor where it dies at is...</p>
  
  <pre><code>public class ImageButton extends javax.swing.JComponent implements java.awt.event.MouseListener {
  
  private static BufferedImage DEFAULTBUTTON;
  private BufferedImage button;
  private Graphics g;
  
  
  public ImageButton(){
      //Call the constructor for JComponent
      super();
      //Grab Graphics
      g = this.getGraphics();
  
      //Find the default images
      try{
      InputStream image;
      image = this.getClass().getClassLoader().getResourceAsStream("DefaultButton.png");
      DEFAULTBUTTON = ImageIO.read(image);
  
      System.out.println("Default image FINE");
      }catch(IOException e){
          System.out.println("Default image fail");
      }
      button = DEFAULTBUTTON;
  
      //Add listener for things like mouse_down, Mouse_up, and Clicked
      this.addMouseListener(this);
  
      //Draw the Default button
      g.drawImage(button, 0, 0, this);
  
  }
  </code></pre>
  
  <p>I would LOVE it you could give me help or point it the right direction.</p>