public void paintIcon(Graphics g) {
      if (icon == null) {
        return;
      }
      final BufferedImage image = ImageUtil.createImage(g, icon.getIconWidth(), icon.getIconHeight(), BufferedImage.TYPE_INT_ARGB);
      final Graphics2D gg = image.createGraphics();
      icon.paintIcon(this, gg, 0, 0);

      final Rectangle bounds = g.getClipBounds();
      int y = icon.getIconHeight() - 1;
      while (y < bounds.y + bounds.height) {
        g.drawImage(image,
                    bounds.x, y, bounds.x + bounds.width, y + 1,
                    0, icon.getIconHeight() - 1, bounds.width, icon.getIconHeight(), this);

        y++;
      }


      g.drawImage(image, 0, 0, this);
    }
public void paintIcon(Graphics g)