Image returnValue = null; if (!GraphicsEnvironment.isHeadless ()) { if (isLightweight () && parent != null) returnValue = parent.createImage (width, height); else if (peer != null) returnValue = peer.createImage (width, height); } return returnValue;
if (peer != null) return peer.createImage(producer); else return getToolkit().createImage(producer);
  public Image createImage (int width, int height)  {    Image returnValue = null;    if (!GraphicsEnvironment.isHeadless ())      {	if (isLightweight () && parent != null)	  returnValue = parent.createImage (width, height);	else if (peer != null)	  returnValue = peer.createImage (width, height);		}    return returnValue;	}