Hi all.
I'm trying to do a long intensive task while updating a JLabel in the GUI.
On a certain point, the Thread needs to stop.
The problem is that it doesn't stop, it keeps updating the JLabel.
After 50000 is passed, it keeps updating.Code:public void run() {
while(!threadDone) {
for(int i = 0; i < 100000; i++) {
model.getLabel().setText(Integer.toString(i));
if(i == 50000) {
threadDone = true;
}
}
}
}
Any help is appreciated.

