title: JComponent Painter
body: <p>I have this source code, which I know works on another machine, but doesn't seem to want to work properly in my eclipse. I'm a bit confused though as I've added the necessary libraries.</p>
  
  <pre><code>private class PainterCloseButtonEnabledBackground implements Painter&lt;JComponent&gt; {
          @Override
          public void paint(Graphics2D g, JComponent c, int w, int h) {
              g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
              g.drawImage(CLOSE_BUTTON_ENABLED, 0, 0, w, h, null);
          }
      }
  </code></pre>
  
  <p>I'm getting a few errors with this.
  The first is in relation to PainterCloseButtonEnabledBackground:</p>
  
  <pre><code>The type UtilityButtonStyle.CloseButton.PainterCloseButtonEnabledBackground must
    implement the inherited abstract method Painter.paint(Graphics2D, Object, int, int)
  </code></pre>
  
  <p>The second is in relation to Painter:</p>
  
  <pre><code>The type Painter&lt;JComponent&gt; is deprecated
  </code></pre>
  
  <p>The third is in relation to the paint method:</p>
  
  <pre><code>The method paint(Graphics2D, JComponent, int, int) of type 
    UtilityButtonStyle.CloseButton.PainterCloseButtonEnabledBackground 
    must override or implement a supertype method
  </code></pre>
  
  <p>Is this just from an earlier version of java? I'm not sure how to interpret these errors and googling hasnt helped. Any advice would be greatly appreciated.</p>
  
  <p>Edit: here are my import statements</p>
  
  <pre><code>import java.io.File;
  import java.io.FileOutputStream;
  import java.io.IOException;
  import java.io.InputStream;
  import java.io.InputStreamReader;
  import java.io.OutputStream;
  import java.util.ArrayList;
  import java.util.Enumeration;
  import java.util.List;
  import java.util.zip.ZipEntry;
  import java.util.zip.ZipException;
  import java.util.zip.ZipFile;
  import controller.ExtractionUpdateListener;
  </code></pre>