Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. private void jButtonSaveActionPerformed(java.awt.event.ActionEvent evt) {
  2. String path = "/Users/World/NetBeans/Wilhelm/test.txt";
  3. String content = jTextArea2.getText();
  4. boolean success = ToolBox.writeTextFile(path, content);
  5. if (success)
  6. {
  7. ToolBox.messageBox("Saved to " + path);
  8.  
  9. }
  10.  
  11. else
  12. {
  13. ToolBox.messageBox("Saved to " + path + " failed!");
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement