{ Rectangle vr = new Rectangle(); Rectangle ir = new Rectangle(); Rectangle tr = new Rectangle(); layoutLabel(tabPlacement, getFontMetrics(), tabIndex, tabPane.getTitleAt(tabIndex), icon, vr, ir, tr, tabIndex == tabPane.getSelectedIndex()); height = tr.union(ir).height; } else height = fontHeight;  height += insets.top + insets.bottom;
height = Math.max(height, icon.getIconHeight()); height += tabInsets.top + tabInsets.bottom + 2;
  protected int calculateTabHeight(int tabPlacement, int tabIndex,                                   int fontHeight)  {    Icon icon = getIconForTab(tabIndex);    Insets insets = getTabInsets(tabPlacement, tabIndex);    int height = 0;    if (icon != null)      {        Rectangle vr = new Rectangle();        Rectangle ir = new Rectangle();        Rectangle tr = new Rectangle();        layoutLabel(tabPlacement, getFontMetrics(), tabIndex,                    tabPane.getTitleAt(tabIndex), icon, vr, ir, tr,                    tabIndex == tabPane.getSelectedIndex());        height = tr.union(ir).height;      }    else      height = fontHeight;    height += insets.top + insets.bottom;    return height;  }