int count = toolBar.getComponentCount(); switch (direction) { case EAST: case SOUTH: if (focusedCompIndex >= 0 && focusedCompIndex < count) { int i = focusedCompIndex + 1; boolean focusRequested = false;  while (i != focusedCompIndex && ! focusRequested) { if (i >= count) i = 0; Component comp = toolBar.getComponentAtIndex(i++); if (comp != null && comp.isFocusable() && comp.isEnabled()) { comp.requestFocus(); focusRequested = true; } } } break; case WEST: case NORTH: if (focusedCompIndex >= 0 && focusedCompIndex < count) { int i = focusedCompIndex - 1; boolean focusRequested = false;  while (i != focusedCompIndex && ! focusRequested) { if (i < 0) i = count - 1; Component comp = toolBar.getComponentAtIndex(i--); if (comp != null && comp.isFocusable() && comp.isEnabled()) { comp.requestFocus(); focusRequested = true; } } } break; default: break; }
  protected void navigateFocusedComp(int direction)    throws NotImplementedException  {    // FIXME: Implement.  }