kohinoor2007
Programmer
Hi guys,
Iam new to Listeners under Swing.Is working on a task under swing & came across the following problem.
Have a comboBox(Say testCombo) filled with some string values.When the user selects one item from thge popup menu or when he presses "Enter" I want to do some action.
Tried adding both the ItemListener & ActionListener to it,but then,
the events are generated even while the user is moving through items in the displayed popup menu or when I add I add some items in the combobox.Thats not what I want..
I want to do some action only when the user selects an item from the comboxbox.(Iam coming from the MFC world.In MFC, could achieve it on a comboclose up event )
How can I achieve this under swing...
Thanks..
Iam new to Listeners under Swing.Is working on a task under swing & came across the following problem.
Have a comboBox(Say testCombo) filled with some string values.When the user selects one item from thge popup menu or when he presses "Enter" I want to do some action.
Tried adding both the ItemListener & ActionListener to it,but then,
the events are generated even while the user is moving through items in the displayed popup menu or when I add I add some items in the combobox.Thats not what I want..
I want to do some action only when the user selects an item from the comboxbox.(Iam coming from the MFC world.In MFC, could achieve it on a comboclose up event )
How can I achieve this under swing...
Thanks..