Forums Register Login

JCombo and its listeners

+Pie Number of slices to send: Send
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).
I can't renounce my name. It's on all my stationery! And hinted in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 847 times.
Similar Threads
when select combo value how change value in other text fields
JComboBox is deaf
Refreshing of combo boxes
NetBeans Matisse JCombBox Event Listener
Drop down event in JComboBox
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 09:39:01.