我正在开发一种 j木申请。
but my application Freeze when I start the process of my application
therefore I can update my GUI during the process
do you guys have any idea how to fixed this ?
请将本函及其附件作为大会文件分发为荷。
居伊 我已经尝试这样做,但是它仍然冻结了情报和安全局。
我的法典
final String key = keywords;
final int dept = dep;
final double rele = relevance;
SwingWorker worker = new SwingWorker<Map, Void>() {
@Override
public Map doInBackground() {
final Map resultMap = focusedCrawlingMain.Search(key, dept, rele);
return resultMap;
}
public void Done(Map dataMap) {
final List resultList = (List) dataMap.get("relevantList");
List resultListValue = (List) dataMap.get("relevantListScore");
int size = resultList.size();
newData = new String[size][3];
for(int i = 0; i < size; i++){
newData[i][0] = String.valueOf(i+1);
newData[i][1] = String.valueOf(resultList.get(i));
newData[i][2] = String.valueOf(resultListValue.get(i));
model.addRow((new Object[]{newData[i][0],newData[i][1],newData[i][2]}));
}
}
};
worker.run();