日期:2014-05-20 浏览次数:20712 次
public class DefaultComboBoxModel extends AbstractListModel implements MutableComboBoxModel, Serializable { public void setSelectedItem(Object anObject) { if ((selectedObject != null && !selectedObject.equals( anObject )) || selectedObject == null && anObject != null) { selectedObject = anObject; fireContentsChanged(this, -1, -1); } } }