我想下载一个文件,等到下载完成后才显示"无响应";没有出现错误。
if(isNeedToReDownload){
launchStatus.setText(LaunchStatus.DOWNLOADING.status);
downloadThread = new Thread(() -> {
for(File file : launchDir.listFiles()){
file.delete();
}
launchDir.delete();
downloadClient();
downloadMods();
});
downloadThread.start();
}
if(downloadThread != null){
downloadThread.join();
downloadThread.stop();
}
}
launchStatus.setText(LaunchStatus.STARTING.status);
创建进度条(无论是否可见)。on循环和其他东西更新进度条