if (hasControlIcons()) paintControlIcons(g, 0, 0, 0, tree, treeModel, root);
paintVerticalPartOfLeg(g, clip, insets, currentVisiblePath); for (int i = startIndex; i <= endIndex; i++) { Object curr = currentVisiblePath.getPathComponent(i); boolean isLeaf = treeModel.isLeaf(curr); TreePath path = new TreePath(getPathToRoot(curr, 0));  boolean isExpanded = tree.isExpanded(path); Rectangle bounds = getPathBounds(tree, path); paintHorizontalPartOfLeg(g, clip, insets, bounds, path, i, isExpanded, false, isLeaf); paintRow(g, clip, insets, bounds, path, i, isExpanded, false, isLeaf); }
  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);      }  }