Okai so I have a jfilechooser
:
JFileChooser chooser = new JFileChooser();
int returnName = chooser.showOpenDialog(null);
if (returnName == JFileChooser.APPROVE_OPTION) {
f = chooser.getSelectedFile();
if (f != null) { // Make sure the user didn't choose a directory.
path = f.getAbsolutePath();//get the absolute path to selected file
//below line to test the file chooser
//System.out.println(path);
}
System.out.println (path);
so now the path is c:\fa\sdf\asdf\sfd\sadf\fsaf.txt
But I want this path to go into this:
BufferedReader in = new BufferedReader(
new FileReader(
"path"));
But its not working ?????