JComponent () { myPluginXML.addActionListener(new BrowseFilesListener(myPluginXML.getTextField(), DevKitBundle.message("deployment.directory.location", META_INF), DevKitBundle.message("saved.message.common", META_INF + File.separator + PLUGIN_XML), BrowseFilesListener.SINGLE_DIRECTORY_DESCRIPTOR)); myManifest.addActionListener(new BrowseFilesListener(myManifest.getTextField(), DevKitBundle.message("deployment.view.select", MANIFEST_MF), DevKitBundle.message("manifest.selection", MANIFEST_MF), BrowseFilesListener.SINGLE_FILE_DESCRIPTOR)); myManifest.setEnabled(myBuildProperties.isUseUserManifest()); myUseUserManifest.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { final boolean selected = myUseUserManifest.isSelected(); myManifest.setEnabled(selected); } }); final GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, JBUI.insets(2), 0, 0); myWholePanel.add(myPluginXMLLabel, gc); myWholePanel.add(myPluginXML, gc); JPanel manifestPanel = new JPanel(new GridBagLayout()); manifestPanel.setBorder(IdeBorderFactory.createTitledBorder(DevKitBundle.message("manifest.settings"))); gc.insets.left = 0; manifestPanel.add(myUseUserManifest, gc); gc.insets.left = 2; gc.weighty = 1.0; manifestPanel.add(myManifest, gc); myWholePanel.add(manifestPanel, gc); myWholePanel.setBorder(JBUI.Borders.empty(5)); return myWholePanel; }