public ConvertToAutomatonPane(RegularEnvironment environment) {
		this.environment = environment;
		JFrame frame = Universe.frameForEnvironment(environment);

		setLayout(new BorderLayout());

		JPanel labels = new JPanel(new BorderLayout());
		labels.add(mainLabel, BorderLayout.NORTH);
		labels.add(detailLabel, BorderLayout.SOUTH);
		mainLabel.setText(" ");
		detailLabel.setText(" ");

		add(labels, BorderLayout.NORTH);
		SelectionDrawer automatonDrawer = new SelectionDrawer(automaton);

		// Do the initialization of the automaton.
		State initialState = automaton.createState(new Point(60, 40));
		State finalState = automaton.createState(new Point(450, 250));
		automaton.setInitialState(initialState);
		automaton.addFinalState(finalState);
		FSATransition initialTransition = new FSATransition(initialState,
				finalState, Discretizer.delambda(environment.getExpression()
						.asString().replace('!', Universe.curProfile.getEmptyString().charAt(0))));
		automaton.addTransition(initialTransition);

		controller = new REToFSAController(this, automaton);

		gui.editor.EditorPane ep = new gui.editor.EditorPane(automatonDrawer,
				new ToolBox() {
					public List tools(AutomatonPane view, AutomatonDrawer drawer) {
						LinkedList tools = new LinkedList();
						tools.add(new ArrowNontransitionTool(view, drawer));
						tools.add(new RegularToAutomatonTransitionTool(view,
								drawer, controller));
						tools.add(new DeexpressionifyTransitionTool(view,
								drawer, controller));
						return tools;
					}
				});

		JToolBar bar = ep.getToolBar();
		bar.addSeparator();
		bar.add(doStepAction);
		bar.add(doAllAction);
		bar.add(exportAction);
		// bar.add(exportAction2);

		add(ep, BorderLayout.CENTER);
	}