public void newfile() {
		if(!saved) {
			this.console.setText("<html>New : File not saved");
			int choice = JOptionPane.showConfirmDialog(this, 
					"Modifications have been done. Do you want to save ?",
					"Last Warning", 
					JOptionPane.INFORMATION_MESSAGE, 
					JOptionPane.YES_NO_CANCEL_OPTION);
			if (choice == 0) { //YES
				this.console.setText(this.console.getText() + "<br>Saving...");
				JFileChooser FCdialog = new JFileChooser();
				int opt = FCdialog.showSaveDialog(this); 
				if (opt == JFileChooser.APPROVE_OPTION) {
					try {
						BufferedWriter out = new BufferedWriter(new FileWriter(FCdialog.getSelectedFile().getPath()));
						out.write(this.textPane.getText()); 
						out.close(); 
					} catch (Exception e) {
						System.out.println(e.getMessage());
					}
					this.console.setText(this.console.getText() + "<br>Clearing...");
					this.textPane.setText(" ");
					this.saved = true;
					this.console.setText(this.console.getText() + "<br>Saved & cleared</html>");
				}
			} else if (choice == 1) { //NO
				this.console.setText(this.console.getText() + "<br>Clearing...");
				this.textPane.setText(" ");
				this.saved = true;
				this.console.setText(this.console.getText() + "<br>Cleared</html>");
			}
		} else {
			this.textPane.setText(" ");
			this.saved = true;
			this.console.setText(this.console.getText() + "<br>Operation canceled</html>");
		}
	}