void (@Nullable String selectedValue) { ComboBoxModel<JdkComboBoxItem> model = getModel(); for (int i = 0; i < model.getSize(); i++) { JdkComboBoxItem item = model.getElementAt(i); if (item.jdkName.equals(selectedValue)) { model.setSelectedItem(item); return; } } if (ExternalSystemJdkUtil.USE_INTERNAL_JAVA.equals(selectedValue)) { JdkComboBoxItem item = getInternalJdkItem(); ((MutableComboBoxModel<JdkComboBoxItem>)model).addElement(item); } if (model.getSize() != 0) { model.setSelectedItem(model.getElementAt(0)); } }