isMinimumSizeDirty = true;  if (e.getStateChange() == ItemEvent.SELECTED && comboBox.isEditable()) comboBox.getEditor().setItem(e.getItem());
ComboBoxModel model = comboBox.getModel(); Object v = model.getSelectedItem(); if (editor != null) { comboBox.configureEditor(comboBox.getEditor(), v); }
    public void itemStateChanged(ItemEvent e)    {      // Lets assume every change invalidates the minimumsize.      isMinimumSizeDirty = true;      if (e.getStateChange() == ItemEvent.SELECTED && comboBox.isEditable())        comboBox.getEditor().setItem(e.getItem());      comboBox.repaint();    }