code: public synchronized void setSelectedItem(final V item) {
          if(item == null) {
              setSelectedIndex(-1);
          }
          else {
              int indexOf = items.indexOf(item);
              if (indexOf != -1) {
                  setSelectedIndex(indexOf);
              }
              else if (!readOnly) {
                  updateText(item.toString());
              }
          }
      }
docs: Programmatically selects one item in the combo box by passing in the value the should be selected. If the value
  isn't in the combo box model, nothing happens for read-only combo boxes and for editable ones the text content
  is changed to match the result from calling the {@code toString()} method of {@code item}.
  <p>
  If called with {@code null}, the selection is cleared.
  @param item Item in the combo box to select, or null if the selection should be cleared