code: public void setComposite(Composite comp) {
          
  		if (comp instanceof AlphaComposite) {
  
  			AlphaComposite composite = (AlphaComposite) comp;
  
  			if (composite.getRule() == 3) {
  
  				alpha = composite.getAlpha();
  				this.composite = composite;
  
  				if (realPaint != null && (realPaint instanceof Color)) {
  
  					Color c = (Color) realPaint;
  					paint = new Color(c.getRed(), c.getGreen(), c.getBlue(),
  							(int) (c.getAlpha() * alpha));
  				}
  				return;
  			}
  		}
  
  		this.composite = comp;
  		alpha = 1.0F;
  
      }
docs: Method contributed by Alexej Suchov
  @see Graphics2D#setComposite(Composite)