public static void handleLabel(Transition transition, Automaton automaton) {
		/*
		 * FSATransition trans = (FSATransition) transition; String label =
		 * trans.getLabel(); String firstChar = label.substring(0,1); String
		 * restOfLabel = label.substring(1);
		 * 
		 * StatePlacer sp = new StatePlacer();
		 * 
		 * State newState =
		 * automaton.createState(sp.getPointForState(automaton)); Transition
		 * newTrans1 = new FSATransition(trans.getFromState(), newState,
		 * firstChar); Transition newTrans2 = new FSATransition(newState,
		 * trans.getToState(), restOfLabel); automaton.addTransition(newTrans1);
		 * automaton.addTransition(newTrans2);
		 * automaton.removeTransition(transition); if(restOfLabel.length() > 1)
		 * handleLabel(newTrans2, automaton);
		 */

		FSATransition trans = (FSATransition) transition;
		State from = transition.getFromState(), f = from, to = transition
				.getToState();
		automaton.removeTransition(trans);
		String label = trans.getLabel();
		int length = label.length();
		for (int i = 0; i < length; i++) {
			State going = i == length - 1 ? to : automaton
					.createState(new java.awt.Point((f.getPoint().x
							* (length - i - 1) + to.getPoint().x * (i + 1))
							/ length, (f.getPoint().y * (length - i - 1) + to
							.getPoint().y
							* (i + 1))
							/ length));
			Transition newTrans = new FSATransition(from, going, label
					.substring(i, i + 1));
			automaton.addTransition(newTrans);
			from = going;
		}
	}