• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JCombo and its listeners

Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic