private synchronized ComponentPlaceholder maybeGetPlaceholderToFocus() {

		if (nextFocusedPlaceholder != null) {
			ComponentPlaceholder temp = nextFocusedPlaceholder;
			setNextFocusPlaceholder(null);
			return temp;
		}

		KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
		Component permanentFocusOwner = kfm.getPermanentFocusOwner();
		Component focusOwner = kfm.getFocusOwner();

		// A null focus owner and a null permanent focus owner imply that Java did not know who  
		// should get focus.  Make sure one of our widgets gets focus.
		if (focusOwner == null && permanentFocusOwner == null) {
			return findNextFocusedComponent();
		}
		return null;
	}
Builds the window menu containing a menu item for each component.
Ghidra/Framework/Docking/src/main/java/docking/DockingWindowManager.java