private static Window getParentWindow(Component parent) {

		/*
		 	Note: Which window should be the parent of the dialog when the user does not specify?
		
		 	Some use cases; a dialog is shown from:
		 		1) A toolbar action
		 		2) A component provider's code
		 		3) A dialog provider's code
		 		4) A background thread
		 		5) The help window
		 		6) A modal password dialog appears over the splash screen
		
		 	It seems like the parent should be the active window for 1-2.
		 	Case 3 should probably use the window of the dialog provider.
		 	Case 4 should probably use the main tool frame, since the user may be
		 	moving between windows while the thread is working.  So, rather than using the
		 	active window, we can default to the tool's frame.
		 	Case 5 should use the help window.
		 	Case 6 should use the splash screen as the parent.
		
		 	We have not yet solidified how we should parent.  This documentation is meant to
		 	move us towards clarity as we find Use Cases that don't make sense.  (Once we
		 	finalize our understanding, we should update the javadoc to list exactly where
		 	the given Dialog Component will be shown.)
		
		 	Use Case
		 		A -The user presses an action on a toolbar from a window on screen 1, while the
		 		   main tool frame is on screen 2.  We want the popup window to appear on screen
		 		   1, not 2.
		 		B -The user presses an action on the toolbar of a Dialog Component.  The popup
		 		   window should appear above the dialog's window and not the main tool frame.
		 		C -The user is working in a modal dialog and presses a button to launch another
		 		   dialog that is:
		 		 	-modal - Java handles this correctly, allowing the new dialog to be used
		 		 	-non-modal - Java prevents the non-modal from being editing if not parented
		 		 	             correctly
		 		D -The user runs a script that shows an input dialog before the non-modal script
		 		   dialog is shown.  If the non-modal dialog is parented to the modal input dialog,
		 		   then the script progress dialog appears on top (which we do not want) and the
		 		   progress dialog goes away when the input dialog is closed.
		 		E -A long-running API shows a non-modal progress dialog.  This API then shows a
		 		   results dialog which is also non-modal.  We do not want to parent the new dialog
		 		   to the original dialog, since it is a progress dialog that will go away.
		
		
		 	For now, the easiest mental model to use is to always prefer the active non-transient
		 	window so that a dialog will appear in the user's view.  If we find a case where this is
		 	not desired, then document it here.
		
		 */

		DockingWindowManager dwm = getActiveInstance();
		Window defaultWindow = dwm != null ? dwm.getRootFrame() : null;
		if (parent == null) {
			Window w = getActiveNonTransientWindow();
			return w == null ? defaultWindow : w;
		}

		Component c = parent;
		while (c != null) {
			// Note: using a Frame here means that we will not find and use a dialog that is a
			//       parent of 'c' if it itself is parented to a Frame.   The issue is that
			//       Use Case 'C' above may not work correctly.  If we find that to be the case,
			//       then we can try changing 'Frame' to 'Window' here.
			if (c instanceof Window && isNonTransientWindow(c)) {
				return (Window) c;
			}
			c = c.getParent();
		}
		return defaultWindow;
	}
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