return null;
if (root == null) throw new IllegalArgumentException ("focus cycle root is null"); if (current == null) throw new IllegalArgumentException ("current component is null");  if (!root.isFocusCycleRoot ()) throw new IllegalArgumentException ("root is not a focus cycle root");  Container ancestor = current.getFocusCycleRootAncestor (); Container prevAncestor = ancestor; while (ancestor != root) { ancestor = current.getFocusCycleRootAncestor (); if (ancestor == prevAncestor) {   if (ancestor != root) throw new IllegalArgumentException ("the given container is not" + " a focus cycle root of the" + " current component"); else break; } prevAncestor = ancestor; }     if ((Component) root == current) root = current.getFocusCycleRootAncestor ();     if (current instanceof Window) return getLastComponent ((Container) current);  Container parent = current.getParent ();  synchronized (parent.getTreeLock ()) { Component[] components = parent.getComponents (); int componentIndex = 0; int numComponents = parent.getComponentCount ();   for (int i = 0; i < numComponents; i++) { if (components[i] == current) componentIndex = i; }   for (int i = componentIndex - 1; i >= 0; i--) { if (accept (components[i])) return components[i];  if (components[i] instanceof Container) { Component result = getLastComponent ((Container) components[i]);  if (result != null) return result;
  public Component getComponentBefore(Container root, Component current)  {    return null;  }