String () { final Object selectedItem = myComboBox.isEditable()? myComboBox.getEditor().getItem() : myComboBox.getSelectedItem(); return selectedItem instanceof String ? (String)selectedItem : null; }