JPanel result = new JPanel(new GridBagLayout());
result.add(aComponent, new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0,0));
FixedSizeButton browseButton = new FixedSizeButton(aComponent.getPreferredSize().height - delta);//ignore border in case of browse button
TextFieldWithBrowseButton.MyDoClickAction.addTo(browseButton, aComponent);
result.add(browseButton, new GridBagConstraints(1, 0, 1, 1, 0, 1, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0,0,0,0), 0,0));
browseButton.addActionListener(aActionListener);
return result;
}
public static JPanel constructDirectoryBrowserField(final JTextField aTextField, final String aSearchedObjectName) {