Saving Files
I am very new to java programming and i am having difficulties properly implimenting a method which saves text from a text area as a file. Here is my current code, it apparently thinks i haven't dealt with an IOException error.
File aFile = null;
String aContents;
int result = fc.showSaveDialog(this);
if (result == fc.APPROVE_OPTION) {
Writer output = null;
try {
output = new BufferedWriter( new FileWriter(aFile) );
output.write( jTextArea1.getText());
} catch (IOException err){
err.printStackTrace();
} finally {
if (!aFile.canWrite()) {
throw new IllegalArgumentException("This File is ******" + aFile);
}
if (output != null) output.close();
}
}
}

