private Component getComponent() {
   return componentCache.getComponent();
 }
  private void initTabLocations(PanePainter pane) {
    findPaintableTabs();

    Dimension minSize = getTabExternalMinSize(tabData.getAreaOrientation());
    Insets aInsets = getTabAreaInsets(tabData.getAreaOrientation());

    int selectedIndex = -1;

    if (tabData.getTabbedPanel().isTabAreaVisible()) {
      for (int i = 0; i < tabData.getTabCount(); i++) {
        final Tab tab = (Tab) tabData.getTabList().get(i);
        final Rectangle visibleRect = (Rectangle) tabData.getVisibleTabRects().get(i);
        Insets insets = getTabInsets(tabData.getAreaOrientation());

        int iconWidth =
            Math.max(
                -insets.left - insets.right,
                getInternalTabWidth(tab) - (tab.getWidth() - visibleRect.width));

        int iconHeight =
            Math.max(
                -insets.top - insets.bottom,
                getInternalTabHeight(tab) - (tab.getHeight() - visibleRect.height));

        Point l = getLocationInTabbedPanel(tab, tabData.getTabbedPanel());

        if ((tabData.isHorizontalLayout()
                && (visibleRect.width >= minSize.width
                    || minSize.width < tabData.getTabbedPanelWidth() - l.x - aInsets.right))
            || (!tabData.isHorizontalLayout()
                && (visibleRect.height >= minSize.height
                    || minSize.height < tabData.getTabbedPanelHeight() - l.y - aInsets.bottom))) {
          final int iWidth = iconWidth;
          final int iHeight = iconHeight;

          SizeIcon icon =
              new SizeIcon(
                  iWidth - getWidthCompensate(tabData.getAreaOrientation()),
                  iHeight - getHeightCompensate(tabData.getAreaOrientation()),
                  isSwapWidthHeight(tabData.getAreaOrientation()));

          int j = pane.getTabCount();
          pane.addTab(EMPTY_STRING, icon, getComponent());

          if (i == tabData.getSelectedTabPainterIndex()) {
            selectedIndex = j;
          }

          if (!tab.isEnabled()) {
            pane.setEnabledAt(j, false);
            pane.setDisabledIconAt(j, icon);
          }
        }
      }
    } else if (tabAreaNotVisibleFix) {
      pane.addTab(EMPTY_STRING, componentCache.getComponent());
    }

    if (pane.getTabCount() > 0) pane.setSelectedIndex(selectedIndex);

    pane.doValidation();
  }