Problem with JComboBox ItemListener

I am using two JComboBoxes and if one combobox item changes automatically the items in the second combobox must be updated according to the first combobox item choosen.problem is : i am getting the items list in the second combobox correctly but the same list is repeating twice.
[293 byte] By [bhuvana] at [2007-10-2 16:48:01]
# 1

hi!

the public void itemStateChanged(ItemEvent a_evt)

of ItemListener

is fired twice once when SELECTED

second on DESELECTED

. so using getStateChange()

method of ItemEvent

class you can track to do the job properly

if( event.getStateChange() == event.SELECTED )

{

//your code

}

Aniruddha-Herea at 2007-7-13 17:59:01 > top of Java-index,Security,Event Handling...
# 2
i got the solution. thank u anirudha dattu
bhuvana at 2007-7-13 17:59:01 > top of Java-index,Security,Event Handling...