code: public void ancestorRemoved (AncestorEvent e)
      {
          lostFocus();
  
          if (_window != null) {
              _window.removeWindowFocusListener(this);
              _window = null;
          }
      }
docs: documentation inherited from interface AncestorListener