Administrator
|
Hi good catch thanks. I should remove that from tips().
There are two workarounds.
One is to just write something inline like
for (int i = 0; i < 100; i++) workspace.iterate();
Another is to use a latch, which is needed if you want the GUI to update properly every iteration
import java.util.concurrent.*;
for (int i = 0; i < 100; i++){
CountDownLatch latch = new CountDownLatch(1);
workspace.iterate(latch, 1);
try {
latch.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
|