void ( @NotNull JLabel label, @NotNull TextFieldWithBrowseButton fileChooser, @NotNull @NlsContexts.DialogTitle String title, boolean forFiles ) { label.setLabelFor(fileChooser); fileChooser.addBrowseFolderListener(title, null, null, new FileChooserDescriptor(forFiles, !forFiles, false, false, false, false), TextComponentAccessor.TEXT_FIELD_WHOLE_TEXT); }