![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e895. Enabling Multiple Selections in a JFileChooser DialogJFileChooser chooser = new JFileChooser(); // Enable multiple selections chooser.setMultiSelectionEnabled(true); // Show the dialog; wait until dialog is closed chooser.showOpenDialog(frame); // Retrieve the selected files. This method returns empty // if multiple-selection mode is not enabled. File[] files = chooser.getSelectedFiles();
© 2002 Addison-Wesley. |