if (treeModel != null && hasControlIcons()) paintControlIcons(g, 0, 0, 0, tree, treeModel, path.getLastPathComponent());
if (shouldPaintExpandControl(path, row, isExpanded, hasBeenExpanded, isLeaf)) { Icon icon = getCurrentControlIcon(path); int iconW = icon.getIconWidth(); int x = bounds.x - rightChildIndent + iconW/2; if (x + iconW > bounds.x) x = bounds.x - rightChildIndent - gap; icon.paintIcon(tree, g, x, bounds.y + bounds.height/2 - icon.getIconHeight()/2); }
  protected void paintExpandControl(Graphics g, Rectangle clipBounds,                                    Insets insets, Rectangle bounds,                                    TreePath path, int row,                                    boolean isExpanded, boolean hasBeenExpanded,                                    boolean isLeaf)  {    if (treeModel != null && hasControlIcons())      paintControlIcons(g, 0, 0, 0, tree, treeModel, path.getLastPathComponent());  }