public void setCenteredOnComponent(Component c) {
		if (c == null) {
			setCenteredOnScreen();
			return;
		}

		if (c instanceof HiddenDockingFrame) {
			setCenteredOnScreen();
			return; // don't center over a hidden frame, as it may be is offscreen
		}

		if (!c.isVisible()) {
			// hidden frames cause us to be put in the upper-left--don't do that
			setCenteredOnScreen();
			return;
		}

		Point p = WindowUtilities.centerOnComponent(c, this);
		setLocation(p);
	}
Centers the dialog on the given component.
@param c the component to center over.
Ghidra/Framework/Docking/src/main/java/docking/DockingDialog.java