Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JCombo and its listeners  RSS feed

 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hallo
I have a combo with variable contend, that means I sometimes remove its elements and add new one.
The combo has also a action listener(java.awt.event.ActionListener) and via this I am informed fi the selection is changed.
The problem comes when I reset the combo and add new elements, in this case after I add the first item to combo an event raises this make GUI logic a little bit "slappy" - I receive an event when I am not expected(I expect to receive enents only when the user change the slection)

There are some work around but I not hapy with them.

I try with the item listener but I reach the same point.

How I can be shore when an event comes that the event comes from the user or form the gui logic(add new items to the combo).
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!