if (treeModel == null) return;
  private final void update()  {    nodes.clear();    row2node.clear();        totalHeight = maximalWidth = 0;    Object root = treeModel.getRoot();    if (rootVisible)      {        countRows(root, null, 0);      }    else      {        int sc = treeModel.getChildCount(root);        for (int i = 0; i < sc; i++)  {            Object child = treeModel.getChild(root, i);            countRows(child, root, 0);          }      }    dirty = false;  } 