tree.addSelectionPath(path);
{  tree.setSelectionPath(path); tree.setAnchorSelectionPath(path); }
  protected void selectPathForEvent(TreePath path, MouseEvent event)  {    if (isToggleSelectionEvent(event))      {        if (tree.isPathSelected(path))          tree.removeSelectionPath(path);        else          {            tree.addSelectionPath(path);            tree.setAnchorSelectionPath(path);          }      }    else if (isMultiSelectEvent(event))      {        TreePath anchor = tree.getAnchorSelectionPath();        if (anchor != null)          {            int aRow = getRowForPath(tree, anchor);            tree.addSelectionInterval(aRow, getRowForPath(tree, path));          }        else          tree.addSelectionPath(path);      }    else      tree.addSelectionPath(path);  }