玻尿酸隆鼻可以侧睡吗:java中jcombobox能否更新数组

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/19 18:09:32
String str1[]=new String[5];
String str2[]=new String[5];
JComboBox jComB=new JComboBox(str1);
上述程序是把下拉列表jComB关联到str1,请问做完如上操作后如何让下拉列表jComB关联到str2?

4月8日 18:16 getSelectedItem()返回的是Object所以你可以这样
Integer.parseInt(getSelectedItem().toString()) //这里toString()是把Object变成String类型的