FileFilter[] old = fileChooser.getChoosableFileFilters();
for (int i = 0; i < old.length; i++) {
FileFilter fileFilter = old[i];
fileChooser.removeChoosableFileFilter(fileFilter);
}
fileChooser.showDialog(this, NbBundle.getMessage(CustomVisualPanel.class, "OK_Button")); // NOI18N
file = fileChooser.getSelectedFile();
if (file != null) {
pathText.setText(file.getAbsolutePath());
}
}//GEN-LAST:event_pathBrowseButtonActionPerformed