private void onSaveClicked() {
		ArrayList<ArrayList<String>> code = getProgramCode();
		JFileChooser fileChooser = new JFileChooser(){
			/**
			 * Serial version UID to stop the warning.
			 */
			private static final long serialVersionUID = 1L;

			@Override
			public void approveSelection(){
				File f = getSelectedFile();
				if (f.exists() && getDialogType() == SAVE_DIALOG){
					int result = JOptionPane.showConfirmDialog(this,"This file already exists, overwrite?", "Existing file",JOptionPane.YES_NO_CANCEL_OPTION);
					switch(result){
					case JOptionPane.YES_OPTION:
						super.approveSelection();
						return;
					case JOptionPane.NO_OPTION:
						return;
					case JOptionPane.CLOSED_OPTION:
						return;
					case JOptionPane.CANCEL_OPTION:
						cancelSelection();
						return;
					}
				}
				super.approveSelection();
			}
		};
		FileNameExtensionFilter filter = new FileNameExtensionFilter("CECIL File", "cecil");
		fileChooser.setFileFilter(filter);
		int returnValue = fileChooser.showSaveDialog(this);
		if (returnValue == JFileChooser.APPROVE_OPTION) {
			controller.saveToFile(code, fileChooser.getSelectedFile().getAbsolutePath());
			currentProgram = getProgramCode();
		}
	}