public void saveDialog()
	{
		JFileChooser fileChooser = new JFileChooser();
		if (fileChooser.showSaveDialog(getComponent(0)) == JFileChooser.APPROVE_OPTION) {
			file = fileChooser.getSelectedFile();
			// save to file
		}
	}