The focus subsystem determines a default order that is applied when using the focus traversal keys (such as Tab) to navigate. The policy of a Swing application is determined by LayoutFocusTraversalPolicy . You can set a focus traversal policy on any Container by using the setFocusCycleRoot method. However, if the container is not a focus cycle root, it may have no apparent effect. Alternatively you can pass focus traversal policy providers to the FocusTraversalPolicy methods instead of focus cycle roots.
Use the isFocusTraversalPolicyProvider() method to determine whether a Container is a focus traversal policy provider.
Use the setFocusTraversalPolicyProvider() method to set a container for providing focus traversal policy. To run it, download and compile it, and then run it as an application.
Comments