code: @Override
      public void paintIcon(Component c, Graphics g, int x, int y) {
          Graphics2D g2 = (Graphics2D) g.create();
          g2.setComposite(AlphaComposite.SrcAtop.derive(alpha));
          icon.paintIcon(c, g2, x, y);
          g2.dispose();
      }
docs: Paints the wrapped icon with this
  <CODE>AlphaIcon</CODE>'s transparency.
  
  @param c The component to which the icon is painted
  @param g the graphics context
  @param x the X coordinate of the icon's top-left corner
  @param y the Y coordinate of the icon's top-left corner