void (@NotNull String text, @NotNull JComponent component, boolean forbidSave) { myTabbedPane.setSelectedComponent(component); String errorPrefix = myTabbedPane.getTitleAt(myTabbedPane.indexOfComponent(component)) + ": "; setOKActionEnabled(!forbidSave); setInvalid(errorPrefix + text, myTabbedPane); }