for (int n = 0; n < tabs.size(); ++n) {
boolean active = (selectedIndex == n);
TabLabel tab = tabs.get(n);
tab.setActive(active);
TextStyle style = active ? activeTabStyle : inactiveTabStyle;
style.makeOver(tab);
Dimension pref = tab.getUnadjustedPreferredSize();
if (pref.height > minHeight) {
minHeight = pref.height;
}
}