Getting full file path for Jfilechooser

Hi im new at programming with Java and I have found examples to get the directory with a file Dialog.

it got really easy method to obtain it, but the thing is tha I want to do it with a Jfilechooser but cannot find the method.

I磀 tryed getting it by making a file but when compiling it gave me a error.

do I have to import a class for creating file? cus it aint recognising the creation of file.

I leave code and bugging.

if (returnVal == JFileChooser.APPROVE_OPTION) {

String nombre = fc.getName();

File f = fc.getSelectedFile();

String path = f.getAbsolutePath();

archivo= path + nombre;

}

}

Z:\RealApplet\Realoader\Realoader.java:89: cannot find symbol

symbol : class File

location: class Realoader

File f = fc.getSelectedFile();

^

1 error

Process completed.

[886 byte] By [Saudstrykera] at [2007-11-27 8:12:06]
# 1
plissss at least read the post
Saudstrykera at 2007-7-12 19:56:23 > top of Java-index,Java Essentials,New To Java...
# 2
mmm forget it everything its fine it was an import problem.forget to import java.io.*;xDDummy
Saudstrykera at 2007-7-12 19:56:23 > top of Java-index,Java Essentials,New To Java...
# 3
Yes, you do need to import java.io.File.
DrClapa at 2007-7-12 19:56:23 > top of Java-index,Java Essentials,New To Java...