Jlist problems

I am having problems with Jlist such that it returns index selectedIndex values in the valueChanged method from its interface method.

SwingUtilities.invokeLater(

new Runnable()

{

public void run()

{

coLogger.debug("csLocationName = " + csLocationName);

csLocationName = SVOpSParseKanji.convertDelimToKanji(csLocationName) ;

coLocationTxtFld.setText(csLocationName);

coListModel.setValues(coWrapperFacilityList);

coList.clearSelection();

populateGeneralFacilityTypeList(coFacilityTypeLists);

if(coTempFacility.getFcltDataInfo().getFcltCode().length() > 0)

{

int iIndex = coListModel.getIndexed(coFacility);

coList.setSelectedIndex(iIndex);

coList.ensureIndexIsVisible(iIndex);

}

coGlassPane.setVisible(false);

}

}

);

after setting this the valueChanged method returns

a selectedIndex value of 5 and 10

what seems to be the problem?.. thanks

[1007 byte] By [fmanubaga] at [2007-10-3 3:52:54]
# 1
> a selectedIndex value of 5 and 10if the problem is you are getting 2 values, itemStateChanged() fires twice,once for DESELECTED, again for SELECTEDyou separate the two by checking getStateChange()
Michael_Dunna at 2007-7-14 21:50:38 > top of Java-index,Desktop,Core GUI APIs...