puzzlePanel_.setShowCandidates(show);
}
public void generatePuzzle(final int delay, final int size) {
Worker worker = new Worker() {
@Override
public Object construct() {
puzzlePanel_.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
SudokuGenerator generator = new SudokuGenerator(size, puzzlePanel_);
generator.setDelay(delay);
puzzlePanel_.generateNewPuzzle(generator);
return true;
}
@Override
public void finished() {
puzzlePanel_.repaint();
puzzlePanel_.setCursor(Cursor.getDefaultCursor());
}
};
worker.start();
}