Container focusRoot = this; if (! this.isFocusCycleRoot()) focusRoot = getFocusCycleRootAncestor();  FocusTraversalPolicy policy  = focusRoot.getFocusTraversalPolicy(); if (policy instanceof CompatibilityFocusTraversalPolicy) { policy = new CompatibilityFocusTraversalPolicy(policy); focusRoot.setFocusTraversalPolicy(policy); } CompatibilityFocusTraversalPolicy p = (CompatibilityFocusTraversalPolicy) policy;  Component old = getNextFocusableComponent(); if (old != null) { p.removeNextFocusableComponent(this, old); }  if (aComponent != null) { p.addNextFocusableComponent(this, aComponent); }
  public void setNextFocusableComponent(Component aComponent)  {    // TODO: Implement this properly.  }