@Override protected void initComponents(String name, final JFormattedTextField textField) { super.initComponents(name, textField); btnStoreBrowser = ComponentFactory.getImageButton(UIImages.FOLDER_ICON.getImageIcon()); btnStoreBrowser.setMargin(new Insets(2, 2, 2, 2)); btnStoreBrowser.setToolTipText(STLConstants.K0642_BROWSE.getValue()); btnStoreBrowser.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { String newFile = chooseFile(textField.getText()); if (newFile != null) { textField.setText(newFile); hostInfoListener.setDirty(); } } }); add(btnStoreBrowser, BorderLayout.EAST); }