code: @Override
      public void paintIcon(Component c, Graphics g, int x, int y) {
          if (backgroundColour == null) g.drawImage(bufferedImage, x, y, null);
          else g.drawImage(bufferedImage, x, y, backgroundColour, null);
      }
docs: Draw the icon at the specified location.