code: public static void centerOnScreenAndSetVisible(Window window) {
  		window.pack();
  		centerOnScreen(window);
  		window.setVisible(true);
  	}
docs: Pack the window, center it on the screen, and set the window visible.
  
  @param window the window to center and show.