this is the code for opening file dialog ... save file dialog is implemented similarly with jFileChooser
private JFileChooser jFileChooser1 = new JFileChooser();
if (JFileChooser.APPROVE_OPTION == jFileChooser1.showOpenDialog(this)) {
// Call openFile to attempt to load the text from file into TextArea
openFile(jFileChooser1.getSelectedFile().getPath());
}
this.repaint();
Reputation Points: 45
Solved Threads: 56
Unauthenticated Liar
Offline 1,767 posts
since Jul 2004