Java JFileChooser save(JFileChooser fileChooser, Runnable action)

Here you can find the source of save(JFileChooser fileChooser, Runnable action)

Description

save

License

Open Source License

Declaration

public static void save(JFileChooser fileChooser, Runnable action) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.JFileChooser;

public class Main {
    public static void save(JFileChooser fileChooser, Runnable action) {
        if (fileChooser.showSaveDialog(null) == JFileChooser.APPROVE_OPTION) {
            action.run();//from  w  w  w.  j  a v a  2  s .  com
        }
    }
}

Related

  1. readAsString(File file)
  2. readFromFile()
  3. removeChoosableFileFilters(JFileChooser fc)
  4. retrieveFilesFromDir(File basedir, FileFilter filter)
  5. run_file_chooser(String file_desc, String extension)
  6. saveFile(Component parent, File defaultFile)
  7. saveFile(String title, File currentDir, javax.swing.filechooser.FileFilter filter)
  8. saveObject(final Object content, final String description, final String extension, final File file)
  9. saveSystemFiles(Component owner)