public void beginMinimizedAutomaton(FiniteStateAutomaton dfa,
			DefaultTreeModel tree) {
		// Create the new view.
		remove(controlPanel);
		FiniteStateAutomaton newAutomaton = new FiniteStateAutomaton();
		minimizer.createStatesForMinimumDfa(dfa, newAutomaton, tree);
		SelectionDrawer drawer = new SelectionDrawer(newAutomaton);
		EditorPane ep = new EditorPane(drawer, new ToolBox() {
			public java.util.List tools(AutomatonPane view,
					AutomatonDrawer drawer) {
				java.util.List tools = new java.util.LinkedList();
				tools.add(new ArrowMinimizeTool(view, drawer));
				tools.add(new TransitionTool(view, drawer));
				return tools;
			}
		});
		// Remove all selected stuff.
		automatonDrawer.clearSelected();
		// Set up the controller device.
		builderController = new BuilderController(dfa, newAutomaton, drawer,
				minimizer, tree, split);
		// Set the view in the right hand side.
		JPanel right = new JPanel(new BorderLayout());
		right.add(ep, BorderLayout.CENTER);
		/*
		 * right.add(new BuilderControlPanel(builderController),
		 * BorderLayout.SOUTH);
		 */
		ep.getToolBar().addSeparator();
		BuilderControlPanel.initView(ep.getToolBar(), builderController);
		split.setRightComponent(right);
		invalidate();
		repaint();

		// Do graph layout.
		AutomatonGraph graph = new AutomatonGraph(newAutomaton);
		graph.addVertex(newAutomaton.getInitialState(), new Point(0, 0));
		Iterator it = builderController.remainingTransitions.iterator();
		while (it.hasNext()) {
			Transition t = (Transition) it.next();
			graph.addEdge(t.getFromState(), t.getToState());
		}
		GEMLayoutAlgorithm layout = new GEMLayoutAlgorithm();
		Set constantStates = new HashSet();
		constantStates.add(newAutomaton.getInitialState());
		layout.layout(graph, constantStates);
		graph.moveAutomatonStates();
		validate();
		ep.getAutomatonPane().fitToBounds(10);
	}