fileChooser.setApproveButtonText(bundle.getString("export_button"));
fileChooser.setFileSelectionMode(FileChooser.FILES_ONLY);
fileChooser.setFileFilter(new XMLFileFilter());
if (source == null)
return null;
int returnVal = fileChooser.showOpenDialog(source);
if (returnVal == FileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
// check if the selected file ends with the extension