Guest User

Untitled

a guest
Mar 13th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. System.getProperty("line.separator");
  2.  
  3. FileChooser fc = new FileChooser();
  4. FileChooser.ExtensionFilter filter = new FileChooser.ExtensionFilter("txt files (*.txt)", "*.txt");
  5. fc.getExtensionFilters().add(filter);
  6.  
  7. File file = fc.showSaveDialog(null);
  8.  
  9. if (file != null) {
  10. try {
  11. PrintWriter write = new PrintWriter(file.getAbsolutePath());
  12. write.print(OutputText); // где OutputText нужный мне string
  13. write.close();
  14. } catch (FileNotFoundException fileNotFoundException) {
  15. ...
  16. }
  17. }
Add Comment
Please, Sign In to add comment