private void createWindow(JComponent comp) {
		RootNode root = (RootNode) parent;
		if (winMgr.isWindowsOnTop() || root.isModal()) {
			window = createDialog(root);
		}
		else {
			window = createFrame();
		}

		if (dropTargetFactory != null) {
			dropTargetHandler = dropTargetFactory.createDropTargetHandler(window);
		}

		setIcon(winMgr.getRootFrame().getIconImage());
		Container contentPane = getContentPane();

		contentPane.setLayout(new BorderLayout());
		contentPane.add(comp, BorderLayout.CENTER);

		statusBar = new StatusBar();
		contentPane.add(statusBar, BorderLayout.SOUTH);

		window.addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent e) {
				close();
			}

			@Override
			public void windowActivated(WindowEvent e) {
				winMgr.setActive(window, true);
			}

			@Override
			public void windowDeactivated(WindowEvent e) {
				winMgr.setActive(window, false);
			}
		});

		adjustBounds();

		window.setBounds(bounds);
		window.setVisible(true);
	}
Creates a new window to host the components tree.
Ghidra/Framework/Docking/src/main/java/docking/DetachedWindowNode.java