1 /*
2 *
3 *
4 */
5 package oscon2006.swing;
6
7 import java.io.File;
8 import java.io.FileFilter;
9
10 public class XlsFileFilter extends javax.swing.filechooser.FileFilter
11 {
12
13 public boolean accept(File f)
14 {
15 if (f == null)
16 {
17 return false;
18 }
19 else
20 {
21 String name = f.getName().toLowerCase();
22 return name.endsWith(".xls");
23 }
24 }
25
26 @Override
27 public String getDescription()
28 {
29 return "XLS (*.xls)";
30 }
31
32 }