void (Component c, Graphics g, int x, int y) { Graphics graphics = g.create(); ((Graphics2D)graphics).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, myAlpha)); myIcon.paintIcon(c, graphics, x, y); }