public void run() {
	if (allTests) {
	    for (int i = 0; i < tapeNames.size(); i += 1) {
		String n = (String)tapeNames.get(i);
		((JRadioButton)tButtons.get(n)).doClick();  // select the last tape
		stop = false;
		while (!stop) Step(false);
		DisplayState();
		if (!solved[i]) break;
	    }
	    Enable();
	    return;
	}

	// just run test user has selected
	int counter = 10000;
	while (!stop) {
	    Step(false);
	    if (delay > 0 || counter-- == 0) {
		counter = 10000;
		DisplayState();
		Toolkit.getDefaultToolkit().sync();
		try { Thread.sleep(delay); }
		catch (InterruptedException e) { break; }
	    }
	}

	DisplayState();
	Enable();
    }