if (!tree.isRootVisible() && tree.isExpanded(new TreePath(((DefaultMutableTreeNode) node) .getPath()))) node = node.getNextNode();
	public int getRowCount(JTree tree)	{      DefaultMutableTreeNode node = ((DefaultMutableTreeNode) (tree.getModel())            .getRoot());      int count = 0;            while (node != null)      {         count++;         node = getNextVisibleNode(node);      }            return count;	}