JFileChooser chooser = new JFileChooser([startDir]);
Note: startDir is optional, but if you use it, in place of [startDir] you actually need to say new File(startDir).getAbsolutePath(). You would want to do this if you expected the user to open the file chooser more than once and would want the dialog to remember the last directory they were in.
int ret = chooser.showOpenDialog(this);
Other choices are: .showSaveDialog(), or just .showDialog() (which allows you to make a "custom" file chooser)
if (ret == JFileChooser.APPROVE_OPTION)
Other choices are: CANCEL_OPTION (they hit the cancel button), or ERROR_OPTION (there was some kind of error or the dialog was closed via the little 'x' button in the corner).
File file = chooser.getSelectedFile();