Object root = treeModel.getRoot(); paintRecursive(g, 0, 0, 0, tree, treeModel, root);
int startIndex = tree.getClosestRowForLocation(clip.x, clip.y); int endIndex = tree.getClosestRowForLocation(clip.x + clip.width, clip.y + clip.height);
  public void paint(Graphics g, JComponent c)  {    JTree tree = (JTree) c;    if (currentVisiblePath == null)      updateCurrentVisiblePath();    if (currentVisiblePath != null && treeModel != null)      {        Object root = treeModel.getRoot();        paintRecursive(g, 0, 0, 0, tree, treeModel, root);        if (hasControlIcons())          paintControlIcons(g, 0, 0, 0, tree, treeModel, root);      }  }