public void save() {
		String title = Tools.getLocalizedString(ActionType.SAVE.name()
				+ ".Name");
		String fonctions = program.getMainPanel().getTextField().getText();
		try {
			if (fileName == null) {
				String file = Tools.showSaveDialog(title).getAbsolutePath();
				if (!file.endsWith(".ks"))
					file += ".ks";
				fileName = new File(file);
			}

			BufferedWriter bw = new BufferedWriter(new FileWriter(fileName));
			bw.append(fonctions);
			bw.newLine();
			bw.close();
			isChanged = false;
			program.setEnabled(ActionType.SAVE, false);
			program.setEnabled(ActionType.SAVE_AS, true);
		} catch (FileNotFoundException e) {
			System.err.println(e.getMessage());
		} catch (IOException e) {
			System.err.println(e.getMessage());
		} catch (Exception e) {
			System.err.println(e.getMessage());
		}

	}