Java examples for JavaFX:DirectoryChooser
Creates a JavaFX system file chooser.
//package com.java2s; import javafx.stage.DirectoryChooser; import javafx.stage.Stage; import java.io.File; public class Main { /**//from w w w . j a v a 2s .com * Creates a system file chooser. Returns chosen file. * @return Directory that user chose. */ public static File letUserSelectDir() { DirectoryChooser chooser = new DirectoryChooser(); return chooser.showDialog(new Stage()); } }