private static Window getBestParent(DialogComponentProvider provider, Component component) {
		Window bestParent = getParentWindow(component);
		if (!provider.isModal()) {
			bestParent = getBestNonModalParent(provider, bestParent);
		}

		if (bestParent == null) {
			// Special case: allow transient password dialogs to parent to the active window.  This
			// allows the password dialog to stay open over the application splash screen.  (This
			// is described in getParentWindow(), which is called above.)
			if (provider instanceof PasswordDialog) {
				bestParent = getJavaActiveWindow();
			}
		}

		if (bestParent != null && !bestParent.isShowing()) {
			bestParent = null; // don't let non-showing windows be parents
		}

		return bestParent;
	}
Shows the dialog using the given parent window using the optional component for positioning.

<p>
Warning: this method allows user to explicitly pass a parent window and component over which
to be centered. There is no reason to use this method in the standard workflow. This method
exists strictly to handle future unforeseen use cases. Use at your own risk of incorrectly
parenting dialogs.

@param parent the component whose window over which the given dialog will be shown; cannot be
           null
@param dialogComponent the DialogComponentProvider object to be shown in a dialog
@param centeredOnComponent the component over which the dialog will be centered; cannot be
           null
Ghidra/Framework/Docking/src/main/java/docking/DockingWindowManager.java