@Override
  public void setPopupVisible(boolean visible) {
    if (getModel().getSize() == 0 && visible) {
      return;
    }
    if (visible) {
      JBPopupFactory jbPopupFactory = getPopupFactory();
      if (jbPopupFactory != null && jbPopupFactory.getChildFocusedPopup(this) != null) {
        return;
      }
    }

    boolean wasShown = isPopupVisible();
    super.setPopupVisible(visible);
    if (!wasShown && visible && isEditable() && !UIManager.getBoolean("ComboBox.isEnterSelectablePopup")) {
      ComboBoxEditor editor = getEditor();
      Object item = editor.getItem(), selectedItem = getSelectedItem();
      if (item == null || item != selectedItem) {
        configureEditor(editor, selectedItem);
      }
    }
  }
@Override
  public void setPopupVisible(boolean visible)