title: java.lang.IllegalArgumentException: Invalid URL: unknown protocol: m / filechooser path problem
body: <p>I am trying to add an image to a gridview using a button that opens up a filechooser that only accepts images. I am getting an exception error when im using the file path from the filechooser to create a setImage to my grid view. I think this is because the path im getting is just not right. </p>
  
  <p>Here is the code where it fails: </p>
  
  <pre><code>public void makeBrowseButton(Stage primaryStage) {
  
    //attach handler
    browseButton.setOnAction(new EventHandler&lt;ActionEvent&gt;() {
      @Override
      public void handle(ActionEvent event) {
        FileChooser fileChooser = new FileChooser();                                                                            // create object
        fileChooser.getExtensionFilters().addAll(new FileChooser.ExtensionFilter("Image Files", "*.png", "*.jpg", "*.gif"));    //filter for music files
        //FileFilter filter = new FileNameExtensionFilter("JPEG file", "jpg", "jpeg");
    if ( !parentPath.equalsIgnoreCase("")) {                                                                              //go to previous directory if exists
        File parentPathFile = new File(parentPath);
        fileChooser.setInitialDirectory(parentPathFile);
    }
        File selectedFile = fileChooser.showOpenDialog(primaryStage);
  
          if (selectedFile != null) {                                                  // display the dialog box
            String wholePath = selectedFile.getPath();
            String name = selectedFile.getName();
            String megaPath = selectedFile.getAbsolutePath();
            parentPath = selectedFile.getParent();
            System.out.println("wholePath: " + wholePath);
            System.out.println("File Name: " + name);
            System.out.println("megaPath: " + megaPath);
  
           Image newAwesomeImage = new Image(megaPath);
           ImageView view = new ImageView();
           view.setImage(newAwesomeImage);
           paneofgridmonkeys.add(view, 0, 0);
           //paneofgridmonkeys.add(new Label("Changed the image!"), 0, 1);
           createDisplay(primaryStage);
         }}});
       }
  </code></pre>
  
  <p>The error message is the title it is saying that the exact problem is line:</p>
  
  <pre><code>view.setImage(newAwesomeImage);
  </code></pre>
  
  <p>as for my system.out results this is what im getting:</p>
  
  <pre><code>wholePath: M:\Home\BenStillerDuckFace.jpg
  File Name: BenStillerDuckFace.jpg
  megaPath: M:\Home\BenStillerDuckFace.jpg
  </code></pre>
  
  <p>ive tried all of these and non work. Any ideas?</p>