Java Swing How to - Show JFileChooser








Question

We would like to know how to show JFileChooser.

Answer

import javax.swing.JFileChooser;
//  w w w  .  ja  v  a  2 s  .  c o  m
public class Main {

  public static void main(String[] args) {

    JFileChooser jfc = new JFileChooser();
    jfc.showOpenDialog(null);

  }
}