ComboBox<String> () { ComboBox<String> combo = new ComboBox<>(KNOWN_TARGETS); combo.setEditable(true); combo.setEditor(new BasicComboBoxEditor() { @Override protected JTextField createEditorComponent() { JBTextField editor = new JBTextField(JavaCompilerBundle.message("settings.same.as.language.level"), 12); editor.getEmptyText().setText(JavaCompilerBundle.message("settings.same.as.language.level")); editor.setBorder(null); return editor; } }); return combo; }