private void performLayout(Automaton automaton, Set locStates) {
		// Apply the graph layout algorithm to those states that
		// appeared without the <x> and <y> tags.
		if (locStates.size() == automaton.getStates().length)
			return;
		AutomatonGraph graph = new AutomatonGraph(automaton);
		LayoutAlgorithm layout = new GEMLayoutAlgorithm();
		for (int i = 0; i < 3; i++)
			// Do it a few times...
			layout.layout(graph, locStates);
		if (locStates.size() < 2) {
			// Make sure things don't get too large or too small in
			// the event that sufficient reference for scaling is not
			// present.
			graph.moveWithinFrame(new java.awt.Rectangle(20, 20, 425, 260));
		}
		graph.moveAutomatonStates();
	}