gt:         c.insets = new Insets(0, 13, 2, 0);
context: /*
   * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
   *
   * Distributable under LGPL license.
   * See terms of license at gnu.org.
   */
  package net.java.sip.communicator.plugin.ldap.configform;
  
  import java.awt.*;
  import java.awt.event.*;
  import java.util.*;
  import java.util.List;
  
  import javax.swing.*;
  
  import net.java.sip.communicator.plugin.ldap.*;
  import net.java.sip.communicator.service.ldap.*;
  import net.java.sip.communicator.service.ldap.LdapConstants.Auth;
  import net.java.sip.communicator.service.ldap.LdapConstants.Encryption;
  import net.java.sip.communicator.service.ldap.LdapConstants.Scope;
  import net.java.sip.communicator.plugin.desktoputil.*;
  //disambiguation
  
  /**
   * The page with hostname/port/encryption fields
   *
   * @author Sebastien Mazy
   * @author Sebastien Vincent
   */
  public class DirectorySettingsForm
      extends SIPCommDialog
      implements ActionListener
  {
      /**
       * Serial version UID.
       */
      private static final long serialVersionUID = 0L;
  
      /**
       * the temporary settings
       */
      private LdapDirectorySettings settings;
  
      /**
       * Component holding the mail field.
       */
      private JTextField mailField = new JTextField();
  
      /**
       * Component holding the mail field.
       */
      private JTextField mailSuffixField = new JTextField();
  
      /**
       * Component holding the work phone field.
       */
      private JTextField workPhoneField = new JTextField();
  
      /**
       * Component holding the mobile phone field.
       */
      private JTextField mobilePhoneField = new JTextField();
  
      /**
       * Component holding the home phone field.
       */
      private JTextField homePhoneField = new JTextField();
  
      /**
       * component holding the name
       */
      private JTextField nameField;
  
      /**
       * component holding the hostname
       */
      private JTextField hostnameField;
  
      /**
       * component holding the connection method
       */
      private JCheckBox encryptionBox = new SIPCommCheckBox(
              Resources.getString("impl.ldap.USE_SSL"));
  
      /**
       * component displaying the port number
       */
      private JSpinner portSpinner;
  
      /**
       * model holding the port number
       */
      private SpinnerNumberModel portModel;
  
      /**
       * the component holding the bind distinguished name
       */
      private JTextField bindDNField;
  
      /**
       * the component holding the password
       */
      private JPasswordField passwordField;
  
      /**
       * component holding the name of the server
       *
       * @see net.java.sip.communicator.plugin.ldaptools.components.LdapDNField
       */
      private JTextField baseDNField = new JTextField();
  
      /**
       * Strings of the authentication method combobox
       * (must be in the same order as in enum Auth)
       *
       * @see net.java.sip.communicator.service.ldap.LdapConstants#Auth
       */
       private final String[] authStrings =
       {
          Resources.getString("impl.ldap.AUTH_NONE"),
          Resources.getString("impl.ldap.AUTH_SIMPLE")
       };
  
      /**
       * Component holding the connection method
       */
      private JComboBox authList = new JComboBox(authStrings);
  
      /**
       * Strings of the connection method combobox
       * (must be in the same order as in enum Encryption)
       *
       * @see net.java.sip.communicator.service.ldap.LdapConstants#Encryption
       */
       private final String[] scopeStrings =
       {
          Resources.getString("impl.ldap.SCOPE_SUB_TREE"),
          Resources.getString("impl.ldap.SCOPE_ONE")
       };
  
      /**
       * Component holding the connection method
       */
      private JComboBox scopeList = new JComboBox(scopeStrings);
  
      /**
       * The prefix label.
       */
      private final JLabel prefixLabel = new JLabel(
          Resources.getString("impl.ldap.PHONE_PREFIX"));
  
      /**
       * The prefix field.
       */
      private final SIPCommTextField prefixField = new SIPCommTextField(
          Resources.getString("impl.ldap.PHONE_PREFIX_EXAMPLE"));
  
      /**
       * Save button.
       */
      private JButton saveBtn = new JButton(
              Resources.getString("impl.ldap.SAVE"));
  
      /**
       * Cancel button.
       */
      private JButton cancelBtn = new JButton(
              Resources.getString("impl.ldap.CANCEL"));
  
      /**
       * Return code.
       */
      private int retCode = 0;
  
      /**
       * Constructor.
       */
      public DirectorySettingsForm()
      {
          this.settings =
              LdapActivator.getLdapService().getFactory().createServerSettings();
          JTabbedPane pane = new JTabbedPane();
          JPanel panel = new TransparentPanel(new BorderLayout());
          JPanel btnPanel = new TransparentPanel(new FlowLayout(
              FlowLayout.RIGHT));
  
          this.setTitle(Resources.getString("impl.ldap.CONFIG_FORM_TITLE"));
  
          setMinimumSize(new Dimension(400, 400));
          setSize(new Dimension(400, 400));
          setPreferredSize(new Dimension(400, 400));
  
          pane.addTab("General", getContentPanel());
          pane.addTab("Fields", getFieldsPanel());
  
          btnPanel.add(saveBtn);
          btnPanel.add(cancelBtn);
  
          panel.add(pane, BorderLayout.CENTER);
          panel.add(btnPanel, BorderLayout.SOUTH);
          getContentPane().add(panel);
  
          pack();
      }
  
      /**
       * the field panel to display.
       *
       * @return this page's panel
       */
      public JPanel getFieldsPanel()
      {
          JPanel contentPanel = new TransparentPanel(new BorderLayout());
          JPanel basePanel = new TransparentPanel(new GridBagLayout());
          GridBagConstraints c = new GridBagConstraints();
  
          JLabel mailLabel = new JLabel(
              Resources.getString("impl.ldap.MAIL_FIELD_NAME"));
          c.gridx = 0;
          c.gridy = 0;
          c.weightx = 0;
          c.weighty = 0;
          c.gridwidth = 1;
          c.insets = new Insets(2, 50, 0, 5);
          c.fill = GridBagConstraints.HORIZONTAL;
          c.anchor = GridBagConstraints.LINE_START;
          basePanel.add(mailLabel, c);
          c.gridx = 1;
          c.gridy = 0;
          c.weightx = 1;
          c.weighty = 0;
          c.gridwidth = GridBagConstraints.REMAINDER;
          c.insets = new Insets(2, 5, 0, 50);
          c.fill = GridBagConstraints.HORIZONTAL;
          c.anchor = GridBagConstraints.LINE_END;
          basePanel.add(mailField, c);
          JLabel mailExampleLabel = new JLabel(
              Resources.getString("impl.ldap.MAIL_FIELD_EXAMPLE"));
          mailExampleLabel.setForeground(Color.GRAY);
          mailExampleLabel.setFont(mailExampleLabel.getFont().deriveFont(8));
          c.gridx = 1;
          c.gridy = 1;
          c.weightx = 1;
          c.weighty = 0;
          c.gridwidth = GridBagConstraints.REMAINDER;
          c.insets = new Insets(0, 13, 2, 0);
          c.fill = GridBagConstraints.HORIZONTAL;
          c.anchor = GridBagConstraints.LINE_START;
          basePanel.add(mailExampleLabel, c);
  
          JLabel mailSuffixLabel = new JLabel(
              Resources.getString("impl.ldap.MAILSUFFIX_FIELD_NAME"));
          c.gridx = 0;
          c.gridy = 2;
          c.weightx = 0;
          c.weighty = 0;
          c.gridwidth = 1;
          c.insets = new Insets(2, 50, 0, 5);
          c.fill = GridBagConstraints.HORIZONTAL;
          c.anchor = GridBagConstraints.LINE_START;
          basePanel.add(mailSuffixLabel, c);
          c.gridx = 1;
          c.gridy = 2;
          c.weightx = 1;
          c.weighty = 0;
          c.gridwidth = GridBagConstraints.REMAINDER;
          c.insets = new Insets(2, 5, 0, 50);
          c.fill = GridBagConstraints.HORIZONTAL;
          c.anchor = GridBagConstraints.LINE_END;
          basePanel.add(mailSuffixField, c);
          JLabel mailSuffixExampleLabel = new JLabel(
              Resources.getString("impl.ldap.MAILSUFFIX_FIELD_EXAMPLE"));
          mailSuffixExampleLabel.setForeground(Color.GRAY);
          mailSuffixExampleLabel.setFont(
              mailSuffixExampleLabel.getFont().deriveFont(8));
          c.gridx = 1;
          c.gridy = 3;
          c.weightx = 1;
          c.weighty = 0;
          c.gridwidth = GridBagConstraints.REMAINDER;
  