java基础13.7.1 Swing列表组件之JComboBox模型
1、ComboBoxModel是一个接口,它代表一般模型。

2、这里我们介绍下实现的几个方法的意思。void setSelectedItem(Object anItem);用于设置下拉列表中的选中项。

3、Object getSelectedItem();用于返回下拉列表框中的选项。

4、我们可以注意到ComboBoxModel还继承了ListModel,所以也就继承了ListModel中的方法。

5、int getSize();返回列表的长度。

6、E getElementAt(int index);返回指定索引处的值。
