开发者

Deselected item in ItemListener.itemStateChanged()

When I listens a combobox with ItemListener how can I know, what item w开发者_开发知识库as deselected when ItemEvent.DESELECTED is fired?


Use ItemEvent.getItem()


You cannot directly get the item index. The workaround is to get the deselected item from ItemEvent.getItem() and find the index by iterating over all items.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜