@Override
    public void run() {
        while (!isFinished() && !stop) {
            fireTransition();
        }
        if (stop) {
            this.gui.getJTextArea1().append("Stopped.\n");
        } else {
            this.gui.getJTextArea1().append("Deadlock.\n");
        }
        this.gui.getJTextArea1().setCaretPosition(this.gui.getJTextArea1().getText().length());
    }