public void handleInteraction(Automaton automaton,
			AutomatonSimulator simulator, Configuration[] configs,
			Object initialInput) {
		JFrame frame = Universe.frameForEnvironment(environment);
		// How many configurations have we had?
		int numberGenerated = 0;
		// When should the next warning be?
		int warningGenerated = WARNING_STEP;
		// How many have accepted?
		int numberAccepted = 0;
		while (configs.length > 0) {
			numberGenerated += configs.length;
			// Make sure we should continue.
			if (numberGenerated >= warningGenerated) {
				if (!confirmContinue(numberGenerated, frame))
					return;
				while (numberGenerated >= warningGenerated)
					warningGenerated *= 2;
			}
			// Get the next batch of configurations.
			ArrayList next = new ArrayList();
			for (int i = 0; i < configs.length; i++) {
				if (configs[i].isAccept()) {
					numberAccepted++;
					if (!reportConfiguration(configs[i], frame))
						return;
				} else {
					next.addAll(simulator.stepConfiguration(configs[i]));
				}
			}
			configs = (Configuration[]) next.toArray(new Configuration[0]);
		}
		if (numberAccepted == 0) {
			JOptionPane.showMessageDialog(frame, "The input was rejected.");
			return;
		}
		JOptionPane.showMessageDialog(frame, numberAccepted + " configuration"
				+ (numberAccepted == 1 ? "" : "s")
				+ " accepted, and\nother possibilities are exhausted.");
	}