JFileChooser chooser = new JFileChooser();
chooser.setCurrentDirectory(new java.io.File("."));
chooser.setDialogTitle("Browse the folder to process");
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chooser.setAcceptAllFileFilterUsed(false);
if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
System.out.println("getCurrentDirectory(): "+ chooser.getCurrentDirectory());
System.out.println("getSelectedFile() : "+ chooser.getSelectedFile());
} else {
System.out.println("No Selection ");
}
hello,
I am currently programming on a mac (os, 10.9.2), using eclipse trying to access a usb drive plugged into my mac, but I cannot see it using this code... I can see everything on my local machine but no drives, any help?
Question
Original Poster
hello,
I am currently programming on a mac (os, 10.9.2), using eclipse trying to access a usb drive plugged into my mac, but I cannot see it using this code... I can see everything on my local machine but no drives, any help?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts