这是我的代码JFileChooser,以选择一个文件,现在我想选择多个文件做JFileChooser,以选择多个文件的Java
JFileChooser chose=new JFileChooser();
chose.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
int r=chose.showOpenDialog(new JFrame());
if(r == chose.APPROVE_OPTION){
String filepath= chose.getSelectedFile().getAbsolutePath();
}
如何选择使用的JFileChooser请帮助多个文件的.. 。
有至少两个duplicat这个问题,请在询问之前尝试Googleing! http://stackoverflow.com/questions/11922152/jfilechooser-to-open-multiple-txt-files http://stackoverflow.com/questions/13060371/adding-multiple-files-with-jfilechooser – jazzbassrob 2013-04-26 12:06:51