Obtain file path and file name using file chooser



Hi All,
I want to obtain both file "path" and the filenamed MyText.txt ....as
in "C:\Documents
and Settings\bH\Desktop\MyShowWithFrame\MyText.txt"

I have tried to discover the options shown in How to Use File Choosers
(The Java™ Tutorials Creating a GUI with JFC-Swing Using Swing
Components).htm

I cannot understand what options should be shown as but this does not
work.

Program snip:
JButton opnButton = new JButton("Open a Text File...");
buttonPanel.add(opnButton);
opnButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
int returnVal = fc.showOpenDialog(FileChooserDemo.this);
fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile ();
strngFileName = file.getName();
}
}
});

});

TIA
bH

.