ComboBoxEditor currentEditor = comboBox.getEditor(); if (currentEditor == null || currentEditor instanceof UIResource) { currentEditor = createEditor(); comboBox.setEditor(currentEditor); } editor = currentEditor.getEditorComponent();
if (comboBox.isEditable()) addEditor();
  protected void installComponents()  {    // create drop down list of items    popup = createPopup();    listBox = popup.getList();    // set editor and renderer for the combo box. Editor is used    // only if combo box becomes editable, otherwise renderer is used    // to paint the selected item; combobox is not editable by default.     comboBox.setRenderer(createRenderer());    // create and install arrow button    arrowButton = createArrowButton();    configureArrowButton();    comboBox.add(arrowButton);    ComboBoxEditor currentEditor = comboBox.getEditor();    if (currentEditor == null || currentEditor instanceof UIResource)      {        currentEditor = createEditor();        comboBox.setEditor(currentEditor);      }    editor = currentEditor.getEditorComponent();    comboBox.revalidate();  }