public static void customizeFocusTraversalOrder ( JComponent container , java . util . List componentsInOrder ) { for ( Iterator i = componentsInOrder . iterator ( ) ; i . hasNext ( ) ; ) { Component comp = ( Component ) i . next ( ) ; if ( comp . getParent ( ) != container ) { throw new IllegalArgumentException ( "Component [" + comp + "] is not a child of [" + container + "]." ) ; } } container . putClientProperty ( FOCUS_ORDER_PROPERTY_NAME , createOrderMapFromList ( componentsInOrder ) ) ; }
Sets a custom focus traversal order for the given container . Child components for which there is no order specified will receive focus after components that do have an order specified in the standard layout order .