fatto:

codice:
	private String selectFolder() {
		String pathFolder = "";
		JFileChooser jFileChooser = new JFileChooser();
		jFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);		
		int returnVal = jFileChooser.showOpenDialog(this); 
		if (returnVal == JFileChooser.APPROVE_OPTION) {  
			try{
				pathFolder = jFileChooser.getSelectedFile().getAbsolutePath().trim();
			}catch(Exception e){
				e.printStackTrace();
			}
		} 
		return pathFolder;
	}