public String getEnteredName() {
    if (myComponent instanceof JComboBox<?> comboBox) {
      return (String)comboBox.getEditor().getItem();
    } else {
      return ((EditorTextField) myComponent).getText();
    }
  }
public String getEnteredName()