}
} else { //otherwise, try to get the last-used tab
int lastTabIndex = -1;
//all this is to just restore the last selected tab
SettingsNode rootNode = settings.getChildNode(MAIN_PANEL);
if (rootNode != null) {
String lastTabName = rootNode.getValueOfChild(CURRENT_TAB, "");
lastTabIndex = getGradleTabIndex(lastTabName);
}
if (lastTabIndex != -1) {
tabbedPane.setSelectedIndex(lastTabIndex);