private void registerActionListeners() {
		view.btnSave.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				boolean written = false;
				Object[] options = { "Yes", "No" };
				int result = JOptionPane.showOptionDialog(null, "Would you like to save your level?", "Save", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]);
				if (result == JOptionPane.YES_OPTION) {
					writeToFile(view.levelname.getText());
					written = true;
				}
				if (written) {
					result = JOptionPane.showOptionDialog(null, "Would you like to start a new game in your level?", "New Game", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]);
					if (result == JOptionPane.YES_OPTION) {
						try {
							view.dispose();
							new Game("src/Maps/" + view.levelname.getText() + ".txt");
						} catch (Exception exc) {
							exc.printStackTrace();
						}
					} else {
						System.exit(0);
					}
				}
			}
		});
		view.btnCancel.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				Object[] options = { "Yes", "No" };
				int result = JOptionPane.showOptionDialog(null, "Would you really like to cancel?", "Cancel", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[1]);
				if (result == JOptionPane.YES_OPTION) {
					System.exit(0);
				}
			}
		});
	}