code: public static Point getCenteringPointOnScreen(Dimension dimension) {
  		Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
  		if (dimension.width > screen.width) {
  			dimension.width = screen.width;
  		}
  		if (dimension.height > screen.height) {
  			dimension.height = screen.height;
  		}
  		return new Point((screen.width - dimension.width) / 2, (screen.height - dimension.height) / 2);
  	}
docs: Return the centering point on the screen for the object with the
  specified dimension.
  
  @param dimension the dimension of an object
  @return The centering point on the screen for that object.