*/
private void initGui() {
this.setLayout(new BorderLayout());
// MAIN PANEL
JPanel mainPanel = new VerticalPanel();
Border margin = new EmptyBorder(10, 10, 5, 10);
this.setBorder(margin);
// NAME
mainPanel.add(makeTitlePanel());
// mailer panel
JPanel mailerPanel = new JPanel();
mailerPanel.setBorder(BorderFactory
.createTitledBorder(BorderFactory.createEtchedBorder(), getAttributesTitle()));
GridBagLayout g = new GridBagLayout();
mailerPanel.setLayout(g);
GridBagConstraints c = new GridBagConstraints();
c.anchor = GridBagConstraints.NORTHWEST;
c.insets = new Insets(0, 0, 0, 0);
c.gridwidth = 1;
mailerPanel.add(new JLabel("From:"));
fromField = new JTextField(25);
fromField.setEditable(true);
c.gridwidth = GridBagConstraints.REMAINDER;
g.setConstraints(fromField, c);
mailerPanel.add(fromField);
c.anchor = GridBagConstraints.NORTHWEST;
c.insets = new Insets(0, 0, 0, 0);
c.gridwidth = 1;
mailerPanel.add(new JLabel("Addressee(s):"));
addressField = new JTextField(25);
addressField.setEditable(true);
c.gridwidth = GridBagConstraints.REMAINDER;
g.setConstraints(addressField, c);
mailerPanel.add(addressField);
c.gridwidth = 1;
mailerPanel.add(new JLabel("SMTP Host:"));
smtpHostField = new JTextField(25);
smtpHostField.setEditable(true);
c.gridwidth = GridBagConstraints.REMAINDER;
g.setConstraints(smtpHostField, c);
mailerPanel.add(smtpHostField);
c.gridwidth = 1;
mailerPanel.add(new JLabel("Failure Subject:"));
failureSubjectField = new JTextField(25);
failureSubjectField.setEditable(true);
c.gridwidth = GridBagConstraints.REMAINDER;
g.setConstraints(failureSubjectField, c);
mailerPanel.add(failureSubjectField);
c.gridwidth = 1;
mailerPanel.add(new JLabel("Success Subject:"));
successSubjectField = new JTextField(25);
successSubjectField.setEditable(true);
c.gridwidth = GridBagConstraints.REMAINDER;
g.setConstraints(successSubjectField, c);
mailerPanel.add(successSubjectField);
c.gridwidth = 1;
mailerPanel.add(new JLabel("Failure Limit:"));
failureLimitField = new JTextField("2", 25);
failureLimitField.setEditable(true);
c.gridwidth = GridBagConstraints.REMAINDER;
g.setConstraints(failureLimitField, c);
mailerPanel.add(failureLimitField);
c.gridwidth = 1;
mailerPanel.add(new JLabel("Success Limit:"));
successLimitField = new JTextField("2", 25);
successLimitField.setEditable(true);
c.gridwidth = GridBagConstraints.REMAINDER;
g.setConstraints(successLimitField, c);
mailerPanel.add(successLimitField);
testerButton = new JButton("Test Mail");
testerButton.addActionListener(this);
testerButton.setEnabled(true);
c.gridwidth = 1;
g.setConstraints(testerButton, c);
mailerPanel.add(testerButton);
c.gridwidth = 1;
mailerPanel.add(new JLabel("Failures:"));
failureField = new JTextField(6);
failureField.setEditable(false);
c.gridwidth = GridBagConstraints.REMAINDER;
g.setConstraints(failureField, c);
mailerPanel.add(failureField);
mainPanel.add(mailerPanel);
this.add(mainPanel, BorderLayout.WEST);
}