final String approveButtonName, final String fileTypeDescription) {
if (fileChooser == null) {
fileChooser = new JFileChooser();
}
fileChooser.resetChoosableFileFilters();
final DefaultFileFilter filter = new DefaultFileFilter();
for (final String extension : defaultExtensions) {
filter.addExtension(extension);
}
filter.setDescription(fileTypeDescription);
fileChooser.setFileFilter(filter);
final int returnVal = fileChooser.showDialog(parent, approveButtonName);
if (returnVal == JFileChooser.APPROVE_OPTION) {
return fileChooser.getSelectedFile();
} else {