else if (forwardKeystrokes.contains (oppositeKeystroke) || backwardKeystrokes.contains (oppositeKeystroke) || upKeystrokes.contains (oppositeKeystroke) || (comp instanceof Container && downKeystrokes.contains (oppositeKeystroke))) e.consume ();
  public void processKeyEvent (Component comp, KeyEvent e)  {    AWTKeyStroke eventKeystroke = AWTKeyStroke.getAWTKeyStrokeForEvent (e);    // For every focus traversal keystroke, we need to also consume    // the other two key event types for the same key (e.g. if    // KEY_PRESSED TAB is a focus traversal keystroke, we also need to    // consume KEY_RELEASED and KEY_TYPED TAB key events).    AWTKeyStroke oppositeKeystroke = AWTKeyStroke.getAWTKeyStroke (e.getKeyCode (),                                                                   e.getModifiersEx (),                                                                   !(e.id == KeyEvent.KEY_RELEASED));    Set forwardKeystrokes = comp.getFocusTraversalKeys (KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS);    Set backwardKeystrokes = comp.getFocusTraversalKeys (KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS);    Set upKeystrokes = comp.getFocusTraversalKeys (KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS);    Set downKeystrokes = null;    if (comp instanceof Container)      downKeystrokes = comp.getFocusTraversalKeys (KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS);    if (forwardKeystrokes.contains (eventKeystroke))      {        focusNextComponent (comp);        e.consume ();  }    else if (backwardKeystrokes.contains (eventKeystroke))  {        focusPreviousComponent (comp);        e.consume ();  }    else if (upKeystrokes.contains (eventKeystroke))  {        upFocusCycle (comp);        e.consume ();  }    else if (comp instanceof Container             && downKeystrokes.contains (eventKeystroke))  {        downFocusCycle ((Container) comp);        e.consume ();  }    else if (forwardKeystrokes.contains (oppositeKeystroke)             || backwardKeystrokes.contains (oppositeKeystroke)             || upKeystrokes.contains (oppositeKeystroke)             || (comp instanceof Container &&                 downKeystrokes.contains (oppositeKeystroke)))      e.consume ();  }