TreeNode getNextNode(TreeNode curr)
Object getNextNode(Object curr)
  TreeNode getNextNode(TreeNode curr)  {    if (curr.getChildCount() != 0)      return curr.getChildAt(0);    TreeNode node = curr;    TreeNode sibling;        do      {        sibling = getNextSibling(node);        node = node.getParent();      }    while (sibling == null &&           node != null);        return sibling;  }