void (AncestorEvent event) { // The 'Code Style' page has become visible, either the first time, or after switching to some other page in Settings (Preferences) and then back to this page. if (ourSelectedTabIndex > 0 && myTabbedPane.getSelectedIndex() != ourSelectedTabIndex) { // At the moment of writing this code, it's possible to get to this line of code only via selectFormatterTab(Settings) method. myTabbedPane.setSelectedIndex(ourSelectedTabIndex); } }