我想使用组合框作为jList
的元素。我在下面的代码中写了这个但是没有用。
AbstractListModel listmodel = new AbstractListModel() {
Object [] objects = all_objects; //all_objects contains ComboBox and Strings
public int getSize() {
return objects.length;
}
public Object getElementAt(int index) {
return objects[index];
}
};
jList2.setModel(listmodel);`