public void chooseFile() {
JFileChooser() chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chooser.showOpenDialog(f); //f is a JFrame
System.out.println.setText("" +(Object)chooser.getSelectedFile());
}
Thanks for the suggestion, but it doesn't do quite what I need it to - still showing only the local drives. I think during setup, I will have to instruct the user to map a network drive so it is shown in the JFileChooser.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.