@Override
	public void actionPerformed(ActionEvent a) {
		if (a.getActionCommand().equals("close")) {
				System.exit(0);
			}
		else if (automaton == null) {
			setError("Es ist noch keine Simulation ausgewählt.");
			return;
		}
		else if (a.getActionCommand().equals("step")) {
			simulator.step();
		}
		else if (a.getActionCommand().equals("start")) {
			start();
		}
		else if (a.getActionCommand().equals("stop")) {
			stop();
		}
		else if (a.getActionCommand().equals("reset")) {
			reset();
		}
		else if (a.getActionCommand().equals("resize")) {
			Dimension c = panel.getGridSize();
			if (c != null) {
				resize(c);
			}
		}
		else if (a.getActionCommand().equals("boundaries")) {
			updateBounds();
		}
	}