Monday, February 3, 2014

JFileChooser Dialog box example2

import javax.swing.*;

class fileChooser2
{
    JFrame f;
   
    fileChooser2()
    {
        f=new JFrame();
        JFileChooser fc=new JFileChooser();
        f.add(fc);
        f.setVisible(true);
        f.setSize(450,350);
        f.setDefaultCloseOperation(f.EXIT_ON_CLOSE);
    }
    public static void main(String surat[])
    {
        new fileChooser2();
    }
}

Output:

No comments:

Post a Comment