Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 void initializeSaveChooser(String filename) {
   sqlSaveChooser = new FileExistsAwareFileChooser();
   FileNameExtensionFilter filter = new FileNameExtensionFilter("SQL Dokumente", "sql");
   sqlSaveChooser.setFileFilter(filter);
   sqlSaveChooser.setSelectedFile(new File(filename));
 }