package mosaiccreator;

import java.io.File;
import javax.swing.*;
import javax.swing.filechooser.*;

public class ImageFilter extends FileFilter {


  public boolean accept(File f) {
    String FileName = f.getName();
    if (f.isDirectory() ||
        FileName.endsWith(".jpeg") ||
        FileName.endsWith(".JPEG") ||
        FileName.endsWith(".jpg") ||
        FileName.endsWith(".gif") ||
        FileName.endsWith(".GIF") ||
        FileName.endsWith(".JPG")) {
      return true;
    }
    else
      return false;
  }

  public String getDescription() {
    return "JPEG Images";
  }
}