Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.getProperty("line.separator");
- FileChooser fc = new FileChooser();
- FileChooser.ExtensionFilter filter = new FileChooser.ExtensionFilter("txt files (*.txt)", "*.txt");
- fc.getExtensionFilters().add(filter);
- File file = fc.showSaveDialog(null);
- if (file != null) {
- try {
- PrintWriter write = new PrintWriter(file.getAbsolutePath());
- write.print(OutputText); // где OutputText нужный мне string
- write.close();
- } catch (FileNotFoundException fileNotFoundException) {
- ...
- }
- }
Add Comment
Please, Sign In to add comment