undoManager.discardAllEdits();
}
}
void saveFile() {
JTextPane2 pane2 = this.getJTextPane();
JFileChooser chooser = new JFileChooser(".");
ExampleFileFilter filter = new ExampleFileFilter("export");
filter.setDescription(FBEdit.getMessage("export.file"));
chooser.setFileFilter(filter);
chooser.setSelectedFile(new File(fileName));
int returnVal = chooser.showSaveDialog(this);
// int javax.swing.JFileChooser.CANCEL_OPTION = 1 [0x1]
// CANCEL_OPTION Return value if cancel is chosen.
// int javax.swing.JFileChooser.APPROVE_OPTION = 0 [0x0]
// APPROVE_OPTION Return value if approve (yes, ok) is chosen.
if (returnVal == JFileChooser.APPROVE_OPTION) {
fileName = chooser.getSelectedFile().getName();
jFile = chooser.getSelectedFile().getAbsolutePath();
try {
FileOutputStream fos = new FileOutputStream(jFile);
PrintStream pfos = new PrintStream(fos);
String text = CalcChecksum.replaceChecksum(pane2.getText());
pfos.print(text);
fos.close();
} catch (IOException e) {
JOptionPane.showMessageDialog(this.getframe(),
FBEdit.getMessage("export.save.error"),