This tips is really useful if you just want to use your specified file extension, such example is your own created file extension.
Lets apply it to JFileChooser!
1. FileNameExtensionFilter filter=new FileNameExtensionFilter("My File Extension",".myf");
This is a class from java that is used to filter only specified extension of file, the "My File Extension" is the abbreviation of your extension, meanwhile ".myf" is your extension
2.myJFileChooser.addChoosableFileFilter(filter);
myJFileChooser is your own JFileChooser Object
Tidak ada komentar:
Posting Komentar