String askForDumpFilename() { int returnVal = sqlSaveChooser.showSaveDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = sqlSaveChooser.getSelectedFile(); System.out.println("Selected dump file " + file.getAbsolutePath()); // return file.getName(); return file.getAbsolutePath(); } else { System.out.println("Save command cancelled by user."); } return null; }