private JMenuBar getCreatedMenuBar() {
		final JMenuBar menuBar = new JMenuBar();
		final JMenu fileMenu = new JMenu("File");
		fileMenu.setMnemonic('F');
		KeyStroke ks;
		final JMenuItem exitItem = new JMenuItem("Exit");
		ks = KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.ALT_MASK);
		exitItem.setAccelerator(ks);
		exitItem.setMnemonic(KeyEvent.VK_X);
		exitItem.addActionListener(new ExitActionListener(this));
		fileMenu.add(exitItem);
		this.optionsMenu = new JMenu("Options");
		this.optionsMenu.setMnemonic('O');
		final JMenu puzzleTypeMenu = new JMenu("Puzzle Type");
		puzzleTypeMenu.setMnemonic('P');
		final ButtonGroup puzzleTypeGroup = new ButtonGroup();
		final JRadioButtonMenuItem eightPuzzleItem = new JRadioButtonMenuItem("8-Puzzle",
				this.puzzleType == PuzzleConfiguration.PUZZLE_8);
		eightPuzzleItem.setMnemonic('8');
		eightPuzzleItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(final ActionEvent e) {
				cancelGraphicsThread();
				GUI.this.showButton.setEnabled(false);
				GUI.this.puzzleType = PuzzleConfiguration.PUZZLE_8;
				GUI.this.aStarItem.setEnabled(true);
				GUI.this.singleThreadedItem.setSelected(true);
				GUI.this.useThreads = false;
				GUI.this.multiThreadedItem.setEnabled(false);
				PuzzleConfiguration.setNumOfThreads(getNumberOfThreads());
				updatePuzzleConfiguration();
				GUI.this.puzzle
						.setNumOfTiles(GUI.this.puzzleType == PuzzleConfiguration.PUZZLE_15 ? 16
								: 9);
			}
		});
		puzzleTypeGroup.add(eightPuzzleItem);
		final JRadioButtonMenuItem fifteenPuzzleItem = new JRadioButtonMenuItem("15-Puzzle",
				this.puzzleType == PuzzleConfiguration.PUZZLE_15);
		fifteenPuzzleItem.setMnemonic('1');
		fifteenPuzzleItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(final ActionEvent e) {
				cancelGraphicsThread();
				GUI.this.showButton.setEnabled(false);
				GUI.this.puzzleType = PuzzleConfiguration.PUZZLE_15;
				if (GUI.this.aStarItem.isSelected()) {
					GUI.this.idaStarItem.setSelected(true);
					GUI.this.algorithmType = PuzzleConfiguration.ALGORITHM_IDASTAR;
				}
				GUI.this.aStarItem.setEnabled(false);
				if (canRunThreads()) {
					GUI.this.multiThreadedItem.setEnabled(true);
				}
				PuzzleConfiguration.setNumOfThreads(getNumberOfThreads());
				updatePuzzleConfiguration();
				GUI.this.puzzle
						.setNumOfTiles(GUI.this.puzzleType == PuzzleConfiguration.PUZZLE_15 ? 16
								: 9);
			}
		});
		puzzleTypeGroup.add(fifteenPuzzleItem);
		puzzleTypeMenu.add(eightPuzzleItem);
		puzzleTypeMenu.add(fifteenPuzzleItem);
		final JMenu algorithmTypeMenu = new JMenu("Algorithm");
		algorithmTypeMenu.setMnemonic('A');
		final ButtonGroup algorithmTypeGroup = new ButtonGroup();
		this.idaStarItem = new JRadioButtonMenuItem("IDA*",
				this.algorithmType == PuzzleConfiguration.ALGORITHM_IDASTAR);
		this.idaStarItem.setMnemonic('I');
		this.idaStarItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(final ActionEvent e) {
				cancelGraphicsThread();
				GUI.this.showButton.setEnabled(false);
				GUI.this.algorithmType = PuzzleConfiguration.ALGORITHM_IDASTAR;
				updatePuzzleConfiguration();
			}
		});
		algorithmTypeGroup.add(this.idaStarItem);
		this.aStarItem = new JRadioButtonMenuItem("A*",
				this.algorithmType == PuzzleConfiguration.ALGORITHM_ASTAR);
		this.aStarItem.setMnemonic('A');
		this.aStarItem.setEnabled(false);
		this.aStarItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(final ActionEvent e) {
				cancelGraphicsThread();
				GUI.this.showButton.setEnabled(false);
				GUI.this.algorithmType = PuzzleConfiguration.ALGORITHM_ASTAR;
				updatePuzzleConfiguration();
			}
		});
		algorithmTypeGroup.add(this.aStarItem);
		algorithmTypeMenu.add(this.idaStarItem);
		algorithmTypeMenu.add(this.aStarItem);
		final JMenu heuristicTypeMenu = new JMenu("Heuristic");
		heuristicTypeMenu.setMnemonic('H');
		final ButtonGroup heuristicTypeGroup = new ButtonGroup();
		final JRadioButtonMenuItem patternDatabaseItem = new JRadioButtonMenuItem(
				"Pattern Database", this.heuristicType == PuzzleConfiguration.HEURISTIC_PD);
		patternDatabaseItem.setMnemonic('P');
		patternDatabaseItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(final ActionEvent e) {
				cancelGraphicsThread();
				GUI.this.showButton.setEnabled(false);
				GUI.this.heuristicType = PuzzleConfiguration.HEURISTIC_PD;
				updatePuzzleConfiguration();
			}
		});
		heuristicTypeGroup.add(patternDatabaseItem);
		final JRadioButtonMenuItem linearConflictItem = new JRadioButtonMenuItem(
				"Manhattan Distance + Linear Conflict",
				this.heuristicType == PuzzleConfiguration.HEURISTIC_LC);
		linearConflictItem.setMnemonic('L');
		linearConflictItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(final ActionEvent e) {
				cancelGraphicsThread();
				GUI.this.showButton.setEnabled(false);
				GUI.this.heuristicType = PuzzleConfiguration.HEURISTIC_LC;
				updatePuzzleConfiguration();
			}
		});
		heuristicTypeGroup.add(linearConflictItem);
		final JRadioButtonMenuItem manhattanDistanceItem = new JRadioButtonMenuItem(
				"Manhattan Distance", this.heuristicType == PuzzleConfiguration.HEURISTIC_MD);
		manhattanDistanceItem.setMnemonic('M');
		manhattanDistanceItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(final ActionEvent e) {
				cancelGraphicsThread();
				GUI.this.showButton.setEnabled(false);
				GUI.this.heuristicType = PuzzleConfiguration.HEURISTIC_MD;
				updatePuzzleConfiguration();
			}
		});
		heuristicTypeGroup.add(manhattanDistanceItem);
		heuristicTypeMenu.add(patternDatabaseItem);
		heuristicTypeMenu.add(linearConflictItem);
		heuristicTypeMenu.add(manhattanDistanceItem);
		final JMenu threadingTypeMenu = new JMenu("Threading Model");
		threadingTypeMenu.setMnemonic('T');
		final ButtonGroup threadingTypeGroup = new ButtonGroup();
		this.singleThreadedItem = new JRadioButtonMenuItem("Single-threaded", false);
		this.singleThreadedItem.setMnemonic('S');
		this.singleThreadedItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(final ActionEvent e) {
				GUI.this.useThreads = false;
				PuzzleConfiguration.setNumOfThreads(getNumberOfThreads());
				GUI.this.statusLabel.setText(PuzzleConfiguration.stringRepresentation());
			}
		});
		this.multiThreadedItem = new JRadioButtonMenuItem("Multi-threaded", true);
		this.multiThreadedItem.setMnemonic('M');
		this.multiThreadedItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(final ActionEvent e) {
				GUI.this.useThreads = true;
				PuzzleConfiguration.setNumOfThreads(getNumberOfThreads());
				GUI.this.statusLabel.setText(PuzzleConfiguration.stringRepresentation());
			}
		});
		if (!canRunThreads()) {
			this.multiThreadedItem.setEnabled(false);
			this.singleThreadedItem.setSelected(true);
		}
		threadingTypeGroup.add(this.singleThreadedItem);
		threadingTypeGroup.add(this.multiThreadedItem);
		threadingTypeMenu.add(this.singleThreadedItem);
		threadingTypeMenu.add(this.multiThreadedItem);
		final JMenu shuffleTypeMenu = new JMenu("Shuffling Method");
		shuffleTypeMenu.setMnemonic('S');
		final ButtonGroup shuffleTypeGroup = new ButtonGroup();
		final JRadioButtonMenuItem shuffleAllItem = new JRadioButtonMenuItem("Shuffle All", true);
		shuffleAllItem.setMnemonic('A');
		shuffleAllItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(final ActionEvent e) {
				GUI.this.keepZeroInCorner = false;
			}
		});
		final JRadioButtonMenuItem shuffleExcludeSpaceItem = new JRadioButtonMenuItem(
				"Keep space in bottom right corner", false);
		shuffleExcludeSpaceItem.setMnemonic('K');
		shuffleExcludeSpaceItem.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(final ActionEvent e) {
				GUI.this.keepZeroInCorner = true;
			}
		});
		shuffleTypeGroup.add(shuffleAllItem);
		shuffleTypeGroup.add(shuffleExcludeSpaceItem);
		shuffleTypeMenu.add(shuffleAllItem);
		shuffleTypeMenu.add(shuffleExcludeSpaceItem);
		this.optionsMenu.add(puzzleTypeMenu);
		this.optionsMenu.add(algorithmTypeMenu);
		this.optionsMenu.add(heuristicTypeMenu);
		this.optionsMenu.add(threadingTypeMenu);
		this.optionsMenu.add(new JSeparator());
		this.optionsMenu.add(shuffleTypeMenu);
		final JMenuItem aboutItem = new JMenuItem("About");
		aboutItem.setMnemonic('A');
		aboutItem.addActionListener(new AboutActionListener(this));
		final JMenu helpMenu = new JMenu("Help");
		helpMenu.setMnemonic('H');
		helpMenu.add(aboutItem);
		menuBar.add(fileMenu);
		menuBar.add(this.optionsMenu);
		menuBar.add(helpMenu);
		return menuBar;
	}