{ sibling = mod.getChild(sibling, size - 1); if (!mod.isLeaf(sibling)) size = mod.getChildCount(sibling);
{ sibling = treeModel.getChild(sibling, size - 1); if (!treeModel.isLeaf(sibling)) size = treeModel.getChildCount(sibling);
  Object getPreviousNode(Object node)  {    TreeModel mod = tree.getModel();    Object parent = getParent(mod.getRoot(), node);    if (parent == null)      return null;        Object sibling = getPreviousSibling(node);    if (sibling == null)      return parent;    int size = 0;    if (!mod.isLeaf(sibling))      size = mod.getChildCount(sibling);    while (size > 0)    {        sibling = mod.getChild(sibling, size - 1);        if (!mod.isLeaf(sibling))        size = mod.getChildCount(sibling);        else          size = 0;    }          return sibling;  }