@Override
		public void propertyChange(PropertyChangeEvent evt) {
			KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
			kfm.removePropertyChangeListener("permanentFocusOwner", this);

			// we need make sure the focus notification is complete before we perform the action
			// in case the action causes a change in focus.
			Swing.runLater(() -> activateAction());
		}
Class for actually invoking the selected action. Creating an instance of this class
causes a listener to be added for when focus changes. This is because we don't want
to invoke the selected action until after this dialog has finished closing and focus
has been returned to the original component that had focus before this dialog was invoked.
Ghidra/Framework/Docking/src/main/java/docking/actions/dialog/ActionChooserDialog.java