SaveFileChooser fileChooser = new SaveFileChooser(getPrefs().mainFileType);
fileChooser.setCurrentDirectory(getPrefs().openLocation);
fileChooser.setSelectedFile(new File(document.getRootNode().getTitle() +
(fileType==JreepadPrefs.FILETYPE_XML?".jree":".hjt")));
if(fileChooser.showSaveDialog(JreepadViewer.this) != JFileChooser.APPROVE_OPTION)
{
successful = false;
return; // No file chosen
}
saveLocation = fileChooser.getSelectedFile();