String () { int index = myTabbedPane.getSelectedIndex(); return switch (index) { case 0 -> "fileTemplates.templates"; case 1 -> "fileTemplates.includes"; case 2 -> "fileTemplates.code"; case 3 -> "fileTemplates.j2ee"; default -> throw new IllegalStateException("wrong index: " + index); }; }