List of utility methods to do JFileChooser Show
File | selectFileForRead(Component parent) Select a file for read opt. final JFileChooser fc = new JFileChooser(""); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); int returnVal = fc.showOpenDialog(parent); if (returnVal == JFileChooser.APPROVE_OPTION) { return fc.getSelectedFile(); if (returnVal == JFileChooser.CANCEL_OPTION) { return null; ... |