import javax.swing.filechooser.FileFilter; import java.io.File; public class fileTypeXML extends FileFilter //Filter file extensions for a fileChooser { private final String strAcceptedExt = "xml"; private final String strDes = "demonisch user profile (*.xml)"; //Tests if each file in the current dir should be visible public boolean accept (File f) { if (f.isDirectory()) { return true; } if (pmValidData.getFileExt(f.getName()).equalsIgnoreCase(strAcceptedExt)) { return true; } return false; } public String getDescription () { return strDes; } }