public void saveAs(JTextArea text) {

		JFileChooser fileC = new JFileChooser();
		 FileNameExtensionFilter filter = new FileNameExtensionFilter(
		"Text files", "txt");
		 fileC.setFileFilter(filter);
		int ret = fileC.showSaveDialog(fileC);

	
		if (ret == javax.swing.JFileChooser.APPROVE_OPTION) {
			java.io.File sFile = fileC.getSelectedFile();

			FileWriter writer = null;
			try {
				writer = new FileWriter(sFile);
				text.write(writer);
			} catch (IOException ex) {

			} finally {
				if (writer != null) {
					try {
						writer.close();
					} catch (IOException x) {
					}
				}
			}
		}
	}