void () { myJarPathComponent = new LabeledComponent<>(); TextFieldWithBrowseButton textFieldWithBrowseButton = new TextFieldWithBrowseButton(); textFieldWithBrowseButton.addBrowseFolderListener(ExecutionBundle.message("choose.jar.file"), null, myProject, new FileChooserDescriptor(false, false, true, true, false, false)); myJarPathComponent.setComponent(textFieldWithBrowseButton); }