private void registerListeners(){
  displayWindow.addWindowFocusListener(this);
  topWindow.addComponentListener(this);
}

private void registerListeners ( ) { displayWindow . addWindowFocusListener ( this ) ; topWindow . addComponentListener ( this ) ; }
registerlisteners , this function registers this class as a listener with the appropriate components . de - registration is handled in the hide ( ) function .
