在JComboBox中,怎样才能得到当前所选项数?

不要getSelectedItem(),那个是返回所选项的内容的。
2025-03-20 23:19:52
推荐回答(1个)
回答1:

int
getSelectedIndex()
Returns the first item in the list that matches the given item.

Object[]
getSelectedObjects()
Returns an array containing the selected item.