}
}
private void onBrowseClick() {
File oldFile = defaultWorkingDirectory();
JFileChooser fileChooser = new AccessibleJFileChooser(NbBundle.getMessage(CloneDestinationDirectoryPanel.class, "ACSD_BrowseFolder"), oldFile); // NO I18N
fileChooser.setDialogTitle(NbBundle.getMessage(CloneDestinationDirectoryPanel.class, "Browse_title")); // NO I18N
fileChooser.setMultiSelectionEnabled(false);
FileFilter[] old = fileChooser.getChoosableFileFilters();
for (int i = 0; i < old.length; i++) {
FileFilter fileFilter = old[i];
fileChooser.removeChoosableFileFilter(fileFilter);
}
fileChooser.addChoosableFileFilter(new FileFilter() {
public boolean accept(File f) {
return f.isDirectory();
}
public String getDescription() {
return NbBundle.getMessage(CloneDestinationDirectoryPanel.class, "Folders"); // NOI18N
}
});
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
fileChooser.showDialog(this, NbBundle.getMessage(CloneDestinationDirectoryPanel.class, "OK_Button")); // NO I18N
File f = fileChooser.getSelectedFile();
if (f != null) {
directoryField.setText(f.getAbsolutePath());
}
}