Java JFileChooser SHOW_JFILECHOOSER(String title, String approvetext, int fileselectionmode, boolean multiselection)

Here you can find the source of SHOW_JFILECHOOSER(String title, String approvetext, int fileselectionmode, boolean multiselection)

Description

SHOJFILECHOOSER

License

Open Source License

Declaration

public static JFileChooser SHOW_JFILECHOOSER(String title, String approvetext, int fileselectionmode,
            boolean multiselection) 

Method Source Code

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

import javax.swing.JFileChooser;

public class Main {
    public static JFileChooser SHOW_JFILECHOOSER(String title, String approvetext, int fileselectionmode,
            boolean multiselection) {
        JFileChooser chooser = new JFileChooser();
        //chooser.setCurrentDirectory(new java.io.File("."));

        chooser.setDialogTitle(title);/*  w  w w  .j a v a2 s .  c o  m*/
        chooser.setApproveButtonText(approvetext);
        chooser.setFileSelectionMode(fileselectionmode);
        chooser.setMultiSelectionEnabled(multiselection);

        return chooser;
    }
}

Related

  1. selectNonExistingFile(Component parent, String extensionWanted)
  2. setCurrentDirectory(JFileChooser fileChooser, String location)
  3. setFile(File file, JFileChooser chooser)
  4. setFileChooserFilters(JFileChooser fileDlg, String filters, int selectIndex)
  5. setSelectedFile(JFileChooser chooser, File file)
  6. showFileChooserLoop(Component parentComponent, JFileChooser chooser)
  7. write(File file, String text)
  8. writeOnFile(String row)
  9. writeStringToFile(String output)