If you're just writing simple text to a file, it's not that hard... You can get the text from a JTextArea (for example) with:
String alltext=textarea.getText();
then write it to a file:
try {
BufferedWriter out=new BufferedWriter(new FileWriter("filename"));
out.write(alltext);
}
catch (IOException e) {
e.printStackTrace();
}
That's it!
Hope that helps :D
Seb
If you want to use a save dialog, you can do that with the code above:
// ask the user for a filename:
JFileChooser fc=new JFileChooser();
int result=fc.showSaveDialog(this);
if (result==JFileChooser.APPROVE_OPTION) {
// the user pressed ok :)
String filename=fc.getSelectedFile();
// do the filewriting bit from before :)
// ...
}
Hope that helps :)
Seb