TreePath parent = path.getParentPath();
  protected void setExpandedState(TreePath path, boolean state)  {    if (path == null)      return;    TreePath parent = path.getParentPath();    doExpandParents(path, state);  }