chooser.addChoosableFileFilter(filter);
chooser.setFileFilter(filters[0]);
}
if (isDirectory) chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
if (operationType == JFileChooser.SAVE_DIALOG) {
if (chooser.showSaveDialog(null)==JFileChooser.APPROVE_OPTION) {
if (txtField != null)
txtField.setText(chooser.getSelectedFile().getAbsolutePath());
}
} else {
if (chooser.showOpenDialog(null)==JFileChooser.APPROVE_OPTION) {