2
JProgressBar가 특정 값으로 작업 할 때 동결 상태가되어 계산을 중단하는 이유를 이해할 수없는 것 같습니다. 예를 들어 코드 벨로우즈는 항상 0으로 표시됩니다.JProgressBar 값 동작 업데이트 (스레드)
...
int value = (100/maxGenerations)*i; //maxGenerations = 2500
final int barValue = value;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
progressBar.setValue(barValue);
}
});
그러나 같은 구현하면 내가 수행이 (단지 쓰레기 계산대로 정확하게 물론되지 않음) 작동 다음
...
int value = (i/100); //where 'i' increments until = 2500
final int barValue = value;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
progressBar.setValue(barValue);
}
});
어떤 아이디어 왜?
그래서 진행률 표시 줄에서 i의 값을 100 번 변경하면됩니다. – MeBigFatGuy