KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager ();
Container focusRoot = getFocusCycleRootAncestor(); Component focusComp = this; while (focusRoot != null && ! (focusRoot.isShowing() && focusRoot.isFocusable() && focusRoot.isEnabled())) { focusComp = focusRoot; focusRoot = focusComp.getFocusCycleRootAncestor(); }
  public void nextFocus ()  {    KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager ();    manager.focusNextComponent (this);	}