Here you can find the source of getFileChooser()
public static JFileChooser getFileChooser()
//package com.java2s; //License from project: Open Source License import javax.swing.*; public class Main { private static JFileChooser fileChooser; public static JFileChooser getFileChooser() { if (fileChooser == null) { fileChooser = new JFileChooser(); }// w w w . ja v a 2 s.c om return fileChooser; } }