JDesktopPane p = getDesktopPane(); if (p != null) { int pos = p.getPosition(this); p.setLayer(this, layer.intValue(), pos); }
setLayer(new Integer(layer));
  public void setLayer(Integer layer)  {    JDesktopPane p = getDesktopPane();    if (p != null)      {	int pos = p.getPosition(this);	p.setLayer(this, layer.intValue(), pos);      }  }