src/share/classes/javax/swing/JComponent.java

Print this page

        

@@ -4147,10 +4147,14 @@
      * Sets the focus traversal keys for a given traversal operation for this
      * Component.
      * Refer to
      * {@link java.awt.Component#setFocusTraversalKeys}
      * for a complete description of this method.
+     * <p>
+     * This method may throw a {@code ClassCastException} if any 
+     * {@code Object} in {@code keystrokes} is not an 
+     * {@code AWTKeyStroke}.
      *
      * @param id one of KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
      *        KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, or
      *        KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS
      * @param keystrokes the Set of AWTKeyStroke for the specified operation

@@ -4159,12 +4163,11 @@
      * @see java.awt.KeyboardFocusManager#UP_CYCLE_TRAVERSAL_KEYS
      * @throws IllegalArgumentException if id is not one of
      *         KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,
      *         KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, or
      *         KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS, or if keystrokes
-     *         contains null, or if any Object in keystrokes is not an
-     *         AWTKeyStroke, or if any keystroke represents a KEY_TYPED event,
+     *         contains null, or if any keystroke represents a KEY_TYPED event,
      *         or if any keystroke already maps to another focus traversal
      *         operation for this Component
      * @since 1.5
      * @beaninfo
      *       bound: true