title: How to identify if the file is an Image (.jpg, .png ...) with Java/JavaFX?
body: <p>I was searching for how to I can identify or check if the file selected by the user is an Image (eg of extension: .jpg or .png or .bmp and more). <strong>Note that the image is not just one file it's list of images.</strong><br>
  I've tried this code:</p>
  
  <pre><code>final File folder = new File( oo );
  final File[] listOfFiles = folder.listFiles();
  ImageView imageView = new ImageView();
  String mimeType = new MimetypesFileTypeMap().getContentType( folder );
  String type = mimeType.split( "/" )[0].toLowerCase();
  if ( !type.equals( "image" ) ) {
      //TODO
  }
  else {
      //TODO
  }
  </code></pre>
  
  <p>After trying that code nothing changed i still get the problem. How i can do so and thanks a lot :-)</p>