📜  文件保护程序 javafx - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:19.914000             🧑  作者: Mango

代码示例1
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!!!