daily pastebin goal
76%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top