public static Point centerOnComponent(Component parent, Component child) {
		Dimension parentSize = parent.getSize();
		Dimension childSize = child.getSize();
		int x = (parentSize.width >> 1) - (childSize.width >> 1);
		int y = (parentSize.height >> 1) - (childSize.height >> 1);
		Point point = new Point(x, y);
		if (child instanceof Window) {
			// windows are in screen coordinates, so convert to the parent coordinates, which
			// SwingUtilities does not do
			SwingUtilities.convertPointToScreen(point, parent);
		}
		else {
			// this handles negative values
			point = SwingUtilities.convertPoint(parent, point, child.getParent());
		}
		return point;
	}
Creates a point that is centered over the given <code>parent</code> component, based upon
the size of the given <code>child</code>.
@param parent The component over which to center the child.
@param child The component which will be centered over the parent
@return a point that is centered over the given <code>parent</code> component, based upon
the size of the given <code>child</code>.
Ghidra/Framework/Generic/src/main/java/generic/util/WindowUtilities.java