ohh VERY GOOD NEW I FOUND HOW TO MADE SAVE BUUTTON ON NOTEPAD !!!
HERE THE WAY
// TODO add your handling code here:
JFileChooser save = new JFileChooser();
int option = save.showSaveDialog(this);
if(option == JFileChooser.APPROVE_OPTION){
try {
BufferedWriter out = new BufferedWriter(new FileWriter(save.getSelectedFile().getPath()));
out.write(this.jTextArea1.getText());
out.close();
}
catch(Exception ex){
System.out.println(ex.getMessage());
}
}
THANKS EVERYONE FOR HELPING ME
No comments:
Post a Comment