public static void ensureOnScreen(Component c, Rectangle bounds) {

		Shape visibleScreenBounds = getVisibleScreenBounds();
		if (visibleScreenBounds.intersects(bounds)) {
			return; // some portion of the window is visible
		}

		Rectangle screen = getScreenBounds(c);
		if (screen == null) {
			throw new IllegalArgumentException("Component is not on screen: " + c);
		}

		Point newPoint = center(screen, bounds.getSize());
		bounds.setLocation(newPoint);
	}
Update the bounds to intersect visible bounds of the screen.  The given component is
used to determine which screen to use for updating the bounds.

<P>Note: the given component's bounds will not be adjusted by this method

@param c the on screen component, used to determine which screen to check against the given
       bounds
@param bounds the bounds to adjust
@throws IllegalArgumentException if the given component is not yet realized (see
        {@link Component#isShowing()}
Ghidra/Framework/Generic/src/main/java/generic/util/WindowUtilities.java