Dialog Keyboard Handling, Focus Order, Action Maps, and So On

Depending on which buttons are inserted into a dialog, certain keystrokes will be mapped automatically:

These are the primary keystrokes that are mapped by the standard dialog and the standard buttons.

To add handling when these keystrokes are pressed, do the following:

By default, the Java Swing implementation sets the focus order of controls to correspond to the order in which they were added to their container, and then those container’s to their container, and so on. This can be overridden by making a call to the method DialogUtils.setFocusOrder(). This mechanism should be used in all dialogs to ensure the focus order of controls is correct and doesn’t rely on how the code for building the containment models was written.