private static Component getRootComponent(Component component) {
		if (component instanceof Window) {
			return component;
		}
		Container parent = component.getParent();
		if (parent == null) {
			return component;
		}
		return getRootComponent(parent);
	}
Finds the highest-level Component parent for the given Component. This
method will stop searching when it finds a Window parent.

@param component
           The child for which to locate the highest-level parent.
@return The highest-level parent of component.
Ghidra/Framework/Docking/src/main/java/docking/widgets/VariableHeightPanel.java