public void actionPerformed(ActionEvent e) {
		if (automaton.getInitialState() == null) {
			JOptionPane.showMessageDialog(Universe
					.frameForEnvironment(environment),
					"The automaton should have " + "an initial state.");
			return;
		}
		AutomatonChecker ac = new AutomatonChecker();
		if (ac.isNFA(automaton)) {
			JOptionPane.showMessageDialog(Universe
					.frameForEnvironment(environment), "This isn't a DFA!");
			return;
		}
		boolean isComplete=checkIfDFAisComplete();
		if (isComplete)
		{
			JOptionPane.showMessageDialog(Universe
					.frameForEnvironment(environment), "DFA is complete. No need for the Trap State");
			
			return;
		}
		AddTrapStatePane trapPane = new AddTrapStatePane(environment);
		environment.add(trapPane, "Adding Trap State", new CriticalTag() {
		});
		environment.setActive(trapPane);
	}