Object node = mod.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node);
Object node = treeModel.getRoot(); if (!tree.isRootVisible() && tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) node = getNextNode(node);
	public TreePath getPathForRow(JTree tree, int row)	{    TreeModel mod = tree.getModel();    if (mod != null)      {        Object node = mod.getRoot();      if (!tree.isRootVisible()        && tree.isExpanded(new TreePath(getPathToRoot(node, 0))))      node = getNextNode(node);		for (int i = 0; i < row; i++)         node = getNextVisibleNode(node);      if (node == null)         return null;    return new TreePath(getPathToRoot(node, 0));   }    return null;  }