I have a jList that is populated dynamically by adding to the underlying listModel. Now if I have three Strings whose value I know and I do
for(i=0;i<3;i++){
jList.setSelectedValue(obj[i],true);//true is for shouldScroll or not
}
only the last item appears to be selected...If this can't be done and I have to set the selection from the underlying model how should I go about it???
Also please note the jList has selection mode:
jList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
Thanks in Advance