DefaultTreeModel model =
(DefaultTreeModel)treePane.getTree().getModel();
int n = model.getChildCount(parentNode);
for (int i=0; i<n; i++)
{
AbstractIndexTreeNode node =
(AbstractIndexTreeNode)model.getChild(parentNode, i);
if (node.getName().equals(index.getName()))
{
TreePath newSelectionPath = new TreePath(node.getPath());
treePane.getTree().setSelectionPath(newSelectionPath);
treePane.getTree().scrollPathToVisible(newSelectionPath);
break;
}
}