Answers for "javafx filechooser"

1

filesaver javafx

FileChooser fileChooser = new FileChooser();
 
//Set extension filter for text files
FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter("TXT files (*.txt)", "*.txt");
fileChooser.getExtensionFilters().add(extFilter);

//Show save file dialog
File file = fileChooser.showSaveDialog(primaryStage);
//Its important towrite showSaveDialog!!!
Posted by: Guest on May-16-2020
1

javafx filechooser specific file

FileChooser fc = new FileChooser();

FileChooser.ExtensionFilter fileExtensions = 
  new FileChooser.ExtensionFilter(
    "Web pages", "*.tpl", "*.html", "*.htm");

fc.getExtensionFilters().add(fileExtensions);
Posted by: Guest on January-29-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language