我无法更新我的进度条...这是我的代码
Thread t=new Thread(new Runnable(){
public void run(){
int i=1;
jProgBar.setMinimum(0);
jProgBar.setMaximum(100);
try {
while(i<=100 || true){
jProgBar.setValue(i);
i++;
Thread.sleep(50);
}
}
catch (InterruptedException ex){
jProgBar.setValue(jProgBar.getMaximum());
}
}
});
t.start();
.... Something code that correctly works
t.interrupt();
进度条状态仅在线程结束时更新。有人能帮我吗??