Color (Color attributesColor) { TabPainterAdapter painterAdapter = myTabs.tabPainterAdapter; TabTheme theme = painterAdapter.getTabTheme(); Color foreground; if (myTabs.getSelectedInfo() == myInfo && (attributesColor == null || UIUtil.getLabelForeground().equals(attributesColor))) { foreground = myTabs.isActiveTabs(myInfo) ? theme.getUnderlinedTabForeground() : theme.getUnderlinedTabInactiveForeground(); } else { foreground = super.getActiveTextColor(attributesColor); } return editLabelForeground(foreground); }