📜  java jcombobox 选中的项目已更改 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:30.565000             🧑  作者: Mango

代码示例1
class ItemChangeListener implements ItemListener{
    @Override
    public void itemStateChanged(ItemEvent event) {
       if (event.getStateChange() == ItemEvent.SELECTED) {
          Object item = event.getItem();
          // do something with object
       }
    }       
}