I am trying to use the JFileChooser to have the user select a file. The absolute directory then needs to be in a string variable so I can use it in later code. So far, I have not found any solution/tips anywhere else online. So far I have...
FileChooser chooser = new JFileChooser();
FileNameExtensionFilter filter = new FileNameExtensionFilter("JPG & GIF Images", "jpg", "gif");
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chooser.getCurrentDirectory();
chooser.setDialogTitle("Select Image to detect facial presence");
chooser.setFileFilter(filter);
int returnVal = chooser.showOpenDialog(null);