filefilter

Java FileFilter

public class DocFilter extends FileFilter { public boolean accept(File f) { if (f.isDirectory()) { return true; } String extension = Utils.getExtension(f); if (extension != null) { if (extension.equals(Utils.doc) || extension.equals(Utils.docx) ) { ...

How to save file using JFileChooser??

Hi, I have a method in my application called "Save as" which Saves the image of my application on computer my into a file. I used the JFileChooser to let the users choose their desired location for saving the file. The problem is unless user explicitly types in the file format, it saves the file with no extension. How can I have formats...

HTML <input type='file'> apply a filter

<input type='file' name='userFile'> now when i will click the browse button, the browse dialog will show all files... what if i want to filter file types lets say only images or .png & .jpg & .gifs only office file like .doc & .docx & .pps how to do it... ...