void (SETab tab) { boolean prevTabIsSingleContributor = myHeader.getSelectedTab().isSingleContributor(); myHeader.switchToTab(tab); boolean nextTabIsSingleContributor = myHeader.getSelectedTab().isSingleContributor(); updateSearchFieldAdvertisement(); if (prevTabIsSingleContributor != nextTabIsSingleContributor) { //reset cell renderer to show/hide group titles in "All" tab myResultsList.setCellRenderer(myResultsList.getCellRenderer()); } }