JFileChooser fc = new JFileChooser(); fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); fc.showOpenDialog(null); File directory = fc.getSelectedFile(); if ( directory != null && directory.isDirectory()) { File[] subFiles = directory.listFiles(); for ( int i = 0; i < subFiles.length; i++ ){ listModel.addElement( subFiles[i] ); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)