&& tree.isExpanded(new TreePath( ((DefaultMutableTreeNode) startNode).getPath())))
&& tree.isExpanded(new TreePath(getPathToRoot(((TreeNode) startNode), 0))))
   Point getCellLocation(int x, int y, JTree tree, TreeModel mod,         Object node, Object startNode)  {      int rowHeight = getRowHeight();      if (startNode == null || startNode.equals(node))  {        if (!tree.isRootVisible() && tree.isExpanded(new TreePath(mod.getRoot())))            return new Point(x + ((((DefaultMutableTreeNode) node).getLevel())                  * rightChildIndent), y);                  return new Point(x + ((((DefaultMutableTreeNode) node).getLevel() + 1)               * rightChildIndent), y);  }			      if (!mod.isLeaf(startNode)            && tree.isExpanded(new TreePath(                  ((DefaultMutableTreeNode) startNode).getPath())))      {         Object child = mod.getChild(startNode, 0);         if (child != null)            return getCellLocation(x, y + rowHeight, tree, mod,                  node, child);  }               return getCellLocation(x, y + rowHeight, tree, mod, node,               getNextVisibleNode((DefaultMutableTreeNode) startNode));	}