treeState.setRowHeight(maxHeight);
  int getMaxHeight(JTree tree)  {    if (maxHeight != 0)      return maxHeight;    Icon e = UIManager.getIcon("Tree.openIcon");    Icon c = UIManager.getIcon("Tree.closedIcon");    Icon l = UIManager.getIcon("Tree.leafIcon");    int rc = getRowCount(tree);    int iconHeight = 0;    for (int row = 0; row < rc; row++)      {        if (isLeaf(row))          iconHeight = l.getIconHeight();        else if (tree.isExpanded(row))          iconHeight = e.getIconHeight();        else          iconHeight = c.getIconHeight();        maxHeight = Math.max(maxHeight, iconHeight + gap);      }    return maxHeight;  }