package uk.ac.leeds.ccg.cluster; import java.awt.*; import java.io.*; public class FileFil implements FilenameFilter{ String ext=""; FileDialog fd; public FileFil(FileDialog fd,String e){ ext=e; this.fd=fd; } public boolean accept(File dir, String name) { if(name != null) { if(ext != null && name.endsWith(ext)){ return true; } } return false; } public void setExtension(String e){ ext=e; } }