這是我的代碼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