Class CustomFocusTraversalPolicy

All Implemented Interfaces:
Serializable

public final class CustomFocusTraversalPolicy extends LayoutFocusTraversalPolicy
This class creates a custom focus policy for Swing components by extending LayoutFocusTraversalPolicy. The focus policy is based upon an array of components. These components are focused as they are placed in the array: array[0] --> array[1] --> ... ---> array[last] ---> array[0] Only components in the array are focused, all other components only gain focus if you place the mouse pointer inside. This is a pretty clean and solid solution to the Swing Focus Issue, at least until Sun provides us with a better one.

Since:
1.20
Author:
Gregory Kotsaftis
See Also:
  • Constructor Details

    • CustomFocusTraversalPolicy

      public CustomFocusTraversalPolicy(Component[] all)
      Constructor.

      Parameters:
      all - The array with the components.
  • Method Details