private void disposeWindow() {
		if (dropTargetHandler != null) {
			dropTargetHandler.dispose();
		}

		winMgr.getMainWindow().requestFocus();

		if (window != null) {
			window.setVisible(false);
			window.dispose();
			window = null;
		}
	}
rebuilds the component tree if needed.
Ghidra/Framework/Docking/src/main/java/docking/DetachedWindowNode.java