Component p = comp.getParent(); while (p != null && p.isLightweight()) p = p.getParent();  if (p != null) {   ComponentPeer peer = p.getPeer(); if (peer != null) peer.setCursor(cursor); }
  public void setCursor(Cursor cursor)  {    Component p = comp.getParent();    while (p != null && p.isLightweight())      p = p.getParent();    if (p != null)      {	// Don't actually change the cursor of the component	// otherwise other childs inherit this cursor.	ComponentPeer peer = p.getPeer();	if (peer != null)	  peer.setCursor(cursor);      }  }