comboBox.revalidate(); } if (editor != null) { comboBox.configureEditor(comboBox.getEditor(), comboBox.getSelectedItem()); } comboBox.repaint();
    public void contentsChanged(ListDataEvent e)    {      // if the item is selected or deselected      // Lets assume every change invalidates the minimumsize.      isMinimumSizeDirty = true;    }