ArK*_*ArK 7 combobox lwuit java-me
我正在使用lwuit和j2me.如何获取组合框选中的项目或索引?我找到了setSelectedIndex的函数,但没有找到所选的函数.
bha*_*ath 19
使用此代码:
combobox.getSelectedIndex();
Run Code Online (Sandbox Code Playgroud)
返回列表中当前选定的偏移量.
combobox.getSelectedItem();
Run Code Online (Sandbox Code Playgroud)
返回列表中当前选定的项目,如果没有选择则返回null