Keyboard Traversal

GUI users today expect to be able to navigate user interface components either by using the mouse or the keyboard. Although While all components could be activated with using the mouse in the original AWT, explicit support for keyboard traversal was only available if it was supported by the native windowing system. As a result, the mechanism for keyboard traversal was inconsistent between platforms and was not supported in the underlying AWT code.

The AWT provides a unified mechanism across platforms for moving the focus from one component to another:

  • TAB moves focus forward to the next component.

  • SHIFT-TAB moves focus backwards to the previous component.

The order of traversal, i.e., which component is in front of or behind ...

Get Graphic Java™ 1.2, Volume I: AWT, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.