public void lostOwnership(Clipboard clipboard,Transferable contents){
  if (ownsSelection) {
    ownsSelection=false;
    if (component != null && !component.hasFocus()) {
      setSelectionVisible(false);
    }
  }
}

public void lostOwnership ( Clipboard clipboard , Transferable contents ) { if ( ownsSelection ) { ownsSelection = false ; if ( component != null && ! component . hasFocus ( ) ) { setSelectionVisible ( false ) ; } } }
toggles the visibility of the selection when ownership is lost .
