JFileChooser: showOpenDialog(Component parent) : JFileChooser « javax.swing « Java by API
- Java by API
- javax.swing
- JFileChooser
JFileChooser: showOpenDialog(Component parent)
import javax.swing.JFileChooser;
public class Main {
public static void main(String[] a) {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
fileChooser.showOpenDialog(null);
}
}
Related examples in the same category