我需要使用一个ComboBox数组,我尝试以不同的方式声明,但我不能。
有人可以帮助我吗?
最后一种方式是:
final String[] comString = {"aa", "bb", "cc", "dd", "ee" };
private JComboBox<String> comList[]= new JComboBox[10];
答案 0 :(得分:0)
通过此声明,它起作用:
private JComboBox comList[]={null,null,null,null,null,null,null,null,null,null};