@Override
	public void actionPerformed(ActionContext context) {
		Window[] windows = Window.getWindows();
		int currentIndex = getIndexForCurrentWindow(windows);
		Window nextWindow = findNextValidWindow(windows, currentIndex);
		if (nextWindow != null) {
			nextWindow.toFront();
		}
	}
Action for transferring focus to the next or previous visible window in the application.
Ghidra/Framework/Docking/src/main/java/docking/action/NextPreviousWindowAction.java