private void ensureVisibility(){
  if (!isVisible()) {
    return;
  }
  setLocation(getFinalLocation());
}

private void ensureVisibility ( ) { if ( ! isVisible ( ) ) { return ; } setLocation ( getFinalLocation ( ) ) ; }
ensures that the window is displayed within the bounds of screen size .
