JFileChooser returns wrong getCurrentDirectory()?
this code doesnt returnt the correct current dirrectory? it appears to always returns the directory one higher than i want... any idea why?
JFileChooser chooser =new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
chooser.setVisible(true);
//get the return value
int returnVal = chooser.showOpenDialog(null);
if(returnVal == JFileChooser.OPEN_DIALOG){
System.out.println("It is going to be written to the location: " +
chooser.getCurrentDirectory() );
}
Message was edited by:
helen_166

