Module org.jpo
Package org.jpo.gui

Class JpgFilter


public class JpgFilter extends FileFilter
This class overrides the abstract javax.swing.filechoose.FileFilter class (not the java.io.FileFilter) to provide a true or false indicator to using JFileChoosers whether the file is a directory or image ending in .jpg or .jpeg.
  • Constructor Details

    • JpgFilter

      public JpgFilter()
  • Method Details

    • accept

      public boolean accept(File file)
      accepts directories and files ending in .jpg, .jpeg
      Specified by:
      accept in class FileFilter
      Parameters:
      file - the file to test
      Returns:
      true if OK
    • getDescription

      public String getDescription()
      returns the description "JPEG Files"
      Specified by:
      getDescription in class FileFilter
      Returns:
      true if it's a jpeg, false if not