my problem is that:
search_text.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
ArrayList<Object> GPDMvalue = (ArrayList<Object>) multiSortList.getValue();
ArrayList<Map<String, Object>> valueList = getDefaultValue(GPDMvalue);
multiSortList.clear();
if(getGPDMList().size()==0)return;
multiSortList.setDataSource(getGPDMList());//new thread 1
multiSortList.setDefaultOrAddValue(valueList);//new thread 2
}
});
when the text changing too fast ,and the thread 1 or thread 2 does't excute completely,and the maybe some problem,so i want add the synchronized
like this
public synchronized void modifyText(ModifyEvent e)
,
is this still a override method and will it work?