private void solvePuzzle() {
		try {
			cancelGraphicsThread();
			this.showButton.setEnabled(false);
			final int numOfTiles = this.puzzleType == PuzzleConfiguration.PUZZLE_15 ? 16 : 9;
			this.initState = Utility.getArray(this.configurationField.getText(), numOfTiles);
			final String initialOrder = Utility.byteArrayToString(this.initState);
			this.configurationField.setText(initialOrder);
			this.puzzle.setOrder(this.initState);
			if (!Utility.isValidPermutation(this.initState)) {
				clearFields();
				new MessageBox(this, "Information", "Puzzle configuration is unsolvable.",
						MessageBox.INFORM);
				highlightInput();
				return;
			}
			this.configurationField.setEnabled(false);
			this.shuffleButton.setEnabled(false);
			this.optionsMenu.setEnabled(false);
			clearFields();
			this.solveButton.setText("Stop");
			this.statusField.setText("Searching for solution...");
			this.initialOrderField.setText(initialOrder);
			this.initialOrderField.setCaretPosition(0);
			PuzzleConfiguration.getAlgorithm().start();
			final Thread t = new Thread(this);
			t.setPriority(Thread.MAX_PRIORITY);
			t.start();
			this.statusUpdateTimer.restart();
		} catch (final IllegalArgumentException iae) {
			new MessageBox(this, "Error", iae.getMessage(), MessageBox.EXCLAIM);
			highlightInput();
		}
	}