Adds a KeyEventDispatcher to this KeyboardFocusManager's dispatcher chain. This KeyboardFocusManager will request that each KeyEventDispatcher dispatch KeyEvents generated by the user before finally dispatching the KeyEvent itself. KeyEventDispatchers will be notified in the order in which they were added. Notifications will halt as soon as one KeyEventDispatcher returns
true
from its
dispatchKeyEvent
method. There is no limit to the total number of KeyEventDispatchers which can be added, nor to the number of times which a particular KeyEventDispatcher instance can be added.
If a null dispatcher is specified, no action is taken and no exception is thrown.
In a multithreaded application, {@link KeyEventDispatcher} behavesthe same as other AWT listeners. See AWT Threading Issues for more details.
@param dispatcher the KeyEventDispatcher to add to the dispatcher chain
@see #removeKeyEventDispatcher