问题描述
- 关于给列表组件安装事件监听器呢,在线等
-
class JCB extends AbstractListModel implements ComboBoxModel
{
String selecteditem=null;
String[] test={"红色","蓝色","黄色","绿色"};
public String getElementAt(int index)
{
return test[index];
}
public int getSize()
{
return test.length;
}
public void setSelectedItem(Object item)
{
selecteditem=(String)item;
}
public Object getSelectedItem()
{
return selecteditem;
}}
这就是我的列表函数
解决方案
http://blog.csdn.net/jianghuiquan/article/details/8307909
时间: 2024-12-05 15:13:52