public void removeNotify(){
  super.removeNotify();
  if (focusedComponent == this) {
    focusedComponent=null;
  }
}

public void removeNotify ( ) { super . removeNotify ( ) ; if ( focusedComponent == this ) { focusedComponent = null ; } }
called by the awt when this component is removed from it ' s parent . this stops clears the currently focused component .
