Hi, i'm using swings jfilechooser in program,i want it to filter files with .txt extension,and it is showing allfiles option also in window,so i want to remove allfiles option,how can i do it plz help me
this is my code: fc1 = new JFileChooser();
fc1.setMultiSelectionEnabled(true); // Allow for multiple selections
fc1.setCurrentDirectory(new File("C:\\"));
fc1.setFileFilter(new FileFilter() { public boolean accept(File f) { return f.getName().toLowerCase().endsWith(".fls") || f.isDirectory(); }
public String getDescription() {
// TODO Auto-generated method stub
return "*.fls";
}
});
Thanks in adavance
mukta