Here you can find the source of fileChooser()
public static JFileChooser fileChooser()
//package com.java2s; import javax.swing.JFileChooser; public class Main { public static JFileChooser fileChooser() { JFileChooser fc = new JFileChooser(); fc.setAcceptAllFileFilterUsed(false); fc.setCurrentDirectory(new java.io.File(".")); return fc; }/*from ww w . j a va 2 s . c o m*/ }