content: /*
   * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
   * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
   */
  package com.eugc;
  
  import java.awt.Color;
  import java.awt.event.KeyAdapter;
  import java.awt.event.KeyEvent;
  import java.io.IOException;
  import java.util.ArrayList;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  
  /**
   *
   * @author 520
   */
  public class CreateSettingsFile extends javax.swing.JFrame {
  
      /**
       * Creates new form CreateSettingsFile
       */
      public CreateSettingsFile() {
          initComponents();
      }
  
      /**
       * This method is called from within the constructor to initialize the form.
       * WARNING: Do NOT modify this code. The content of this method is always
       * regenerated by the Form Editor.
       */
      @SuppressWarnings("unchecked")
      // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
      private void initComponents() {
  
          jFrame1 = new javax.swing.JFrame();
          jScrollPane1 = new javax.swing.JScrollPane();
          jPanel1 = new javax.swing.JPanel();
          CoreConfigBox = new javax.swing.JPanel();
          TimeoutText = new javax.swing.JTextField();
          TimeoutLabel = new javax.swing.JLabel();
          AlertMenthodLabel = new javax.swing.JLabel();
          AlertMethod = new javax.swing.JComboBox<>();
          TestButton = new javax.swing.JButton();
          BrowserLabel = new javax.swing.JLabel();
          Browser = new javax.swing.JComboBox<>();
          CUEOptionsBox = new javax.swing.JPanel();
          jLabel6 = new javax.swing.JLabel();
          CUEIDNumberLabel = new javax.swing.JLabel();
          CUEIDType = new javax.swing.JComboBox<>();
          CUEIDNumber = new javax.swing.JTextField();
          jLabel8 = new javax.swing.JLabel();
          CUEFullName = new javax.swing.JTextField();
          jLabel9 = new javax.swing.JLabel();
          CUEPhoneNumber = new javax.swing.JTextField();
          CUEEmail = new javax.swing.JTextField();
          jLabel10 = new javax.swing.JLabel();
          CertificadosOptionsBox = new javax.swing.JPanel();
          jLabel11 = new javax.swing.JLabel();
          jLabel12 = new javax.swing.JLabel();
          CertificadosIDType = new javax.swing.JComboBox<>();
          CertificadosIDNumber = new javax.swing.JTextField();
          jLabel13 = new javax.swing.JLabel();
          CertificadosFullName = new javax.swing.JTextField();
          jLabel14 = new javax.swing.JLabel();
          CertificadosPhoneNumber = new javax.swing.JTextField();
          CertificadosEmail = new javax.swing.JTextField();
          jLabel15 = new javax.swing.JLabel();
          TIEIssuanceOptionsBox = new javax.swing.JPanel();
          jLabel17 = new javax.swing.JLabel();
          TIEIssuanceIDNumber = new javax.swing.JTextField();
          jLabel18 = new javax.swing.JLabel();
          TIEIssuanceFullName = new javax.swing.JTextField();
          jLabel19 = new javax.swing.JLabel();
          TIEIssuancePhoneNumber = new javax.swing.JTextField();
          TIEIssuanceEmail = new javax.swing.JTextField();
          jLabel20 = new javax.swing.JLabel();
          TIECollectionOptionsBox = new javax.swing.JPanel();
          jLabel21 = new javax.swing.JLabel();
          TIECollectionIDNumber = new javax.swing.JTextField();
          jLabel22 = new javax.swing.JLabel();
          TIECollectionFullName = new javax.swing.JTextField();
          jLabel23 = new javax.swing.JLabel();
          TIECollectionPhoneNumber = new javax.swing.JTextField();
          TIECollectionEmail = new javax.swing.JTextField();
          jLabel24 = new javax.swing.JLabel();
          TIEFingerprintsOptionsBox = new javax.swing.JPanel();
          TIEFingerprintsIDNumberLabel = new javax.swing.JLabel();
          TIEFingerprintsIDNumber = new javax.swing.JTextField();
          jLabel26 = new javax.swing.JLabel();
          TIEFingerprintsFullName = new javax.swing.JTextField();
          jLabel27 = new javax.swing.JLabel();
          TIEFingerprintsPhoneNumber = new javax.swing.JTextField();
          TIEFingerprintsEmail = new javax.swing.JTextField();
          jLabel28 = new javax.swing.JLabel();
          TIEFingerprintsIDType = new javax.swing.JComboBox<>();
          jLabel16 = new javax.swing.JLabel();
          appointmentTypeData = new javax.swing.JComboBox<>();
          jLabel1 = new javax.swing.JLabel();
          jButton1 = new javax.swing.JButton();
          jButton2 = new javax.swing.JButton();
  
          javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
          jFrame1.getContentPane().setLayout(jFrame1Layout);
          jFrame1Layout.setHorizontalGroup(
              jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGap(0, 400, Short.MAX_VALUE)
          );
          jFrame1Layout.setVerticalGroup(
              jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGap(0, 300, Short.MAX_VALUE)
          );
  
          setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
          setTitle("NIEBot Configuration");
  
          jScrollPane1.setColumnHeaderView(null);
          jScrollPane1.setPreferredSize(new java.awt.Dimension(0, 0));
  
          jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.Y_AXIS));
  
          CoreConfigBox.setBorder(javax.swing.BorderFactory.createTitledBorder("Application Configurations"));
          CoreConfigBox.setName("Settings"); // NOI18N
  
          TimeoutText.setText("15");
          TimeoutText.addKeyListener(new KeyAdapter() {
              public void keyPressed(KeyEvent ke) {
                  String value = TimeoutText.getText();
                  int l = value.length();
                  if (ke.getKeyChar() >= '0' && ke.getKeyChar() <= '9') {
                      TimeoutText.setEditable(true);
                  } else {
                      TimeoutText.setEditable(false);
                      TimeoutText.setBackground(new Color(255,0,0));
                  }
              }
          });
          TimeoutText.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TimeoutTextActionPerformed(evt);
              }
          });
  
          TimeoutLabel.setText("Timeout");
  
          AlertMenthodLabel.setText("Alert Method");
  
          AlertMethod.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Noise", "OS Notify" }));
          AlertMethod.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  AlertMethodActionPerformed(evt);
              }
          });
  
          TestButton.setText("Test");
          TestButton.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TestButtonActionPerformed(evt);
              }
          });
  
          BrowserLabel.setText("Alert Method");
  
          Browser.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Google Chrome (Recommended)", "Mozilla Firefox" }));
          Browser.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  BrowserActionPerformed(evt);
              }
          });
  
          javax.swing.GroupLayout CoreConfigBoxLayout = new javax.swing.GroupLayout(CoreConfigBox);
          CoreConfigBox.setLayout(CoreConfigBoxLayout);
          CoreConfigBoxLayout.setHorizontalGroup(
              CoreConfigBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(CoreConfigBoxLayout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(CoreConfigBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                      .addGroup(CoreConfigBoxLayout.createSequentialGroup()
                          .addGroup(CoreConfigBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                              .addComponent(TimeoutLabel)
                              .addComponent(AlertMenthodLabel))
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addGroup(CoreConfigBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                              .addComponent(TimeoutText)
                              .addComponent(AlertMethod, 0, 138, Short.MAX_VALUE))
                          .addGap(18, 18, 18)
                          .addComponent(TestButton))
                      .addGroup(CoreConfigBoxLayout.createSequentialGroup()
                          .addComponent(BrowserLabel)
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addComponent(Browser, 0, 228, Short.MAX_VALUE)))
                  .addContainerGap(94, Short.MAX_VALUE))
          );
          CoreConfigBoxLayout.setVerticalGroup(
              CoreConfigBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(CoreConfigBoxLayout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(CoreConfigBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(TimeoutText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                      .addComponent(TimeoutLabel))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(CoreConfigBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(AlertMethod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                      .addComponent(TestButton)
                      .addComponent(AlertMenthodLabel))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
                  .addGroup(CoreConfigBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(BrowserLabel)
                      .addComponent(Browser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
          );
  
          jPanel1.add(CoreConfigBox);
  
          CUEOptionsBox.setBorder(javax.swing.BorderFactory.createTitledBorder("EU Residency Certificate (CUE) Configurations"));
          CUEOptionsBox.setName("Settings"); // NOI18N
  
          jLabel6.setText("ID Type");
  
          CUEIDNumberLabel.setText("ID Number");
  
          CUEIDType.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "NIE", "Passport" }));
          CUEIDType.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  CUEIDTypeActionPerformed(evt);
              }
          });
  
          CUEIDNumber.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  CUEIDNumberActionPerformed(evt);
              }
          });
  
          jLabel8.setText("Full Name");
  
          CUEFullName.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  CUEFullNameActionPerformed(evt);
              }
          });
  
          jLabel9.setText("Spanish Phone Number");
  
          CUEPhoneNumber.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  CUEPhoneNumberActionPerformed(evt);
              }
          });
  
          CUEEmail.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  CUEEmailActionPerformed(evt);
              }
          });
  
          jLabel10.setText("Email Address");
  
          javax.swing.GroupLayout CUEOptionsBoxLayout = new javax.swing.GroupLayout(CUEOptionsBox);
          CUEOptionsBox.setLayout(CUEOptionsBoxLayout);
          CUEOptionsBoxLayout.setHorizontalGroup(
              CUEOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(CUEOptionsBoxLayout.createSequentialGroup()
                  .addGap(25, 25, 25)
                  .addGroup(CUEOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                      .addGroup(CUEOptionsBoxLayout.createSequentialGroup()
                          .addComponent(jLabel10)
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addComponent(CUEEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                      .addGroup(CUEOptionsBoxLayout.createSequentialGroup()
                          .addComponent(jLabel9)
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addComponent(CUEPhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                      .addGroup(CUEOptionsBoxLayout.createSequentialGroup()
                          .addGroup(CUEOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                              .addComponent(jLabel8)
                              .addComponent(jLabel6)
                              .addComponent(CUEIDNumberLabel))
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addGroup(CUEOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                              .addGroup(CUEOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                  .addComponent(CUEIDType, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                  .addComponent(CUEIDNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                              .addComponent(CUEFullName, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))))
                  .addContainerGap(91, Short.MAX_VALUE))
          );
          CUEOptionsBoxLayout.setVerticalGroup(
              CUEOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(CUEOptionsBoxLayout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(CUEOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel6)
                      .addComponent(CUEIDType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(CUEOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(CUEIDNumberLabel)
                      .addComponent(CUEIDNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(CUEOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel8)
                      .addComponent(CUEFullName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(CUEOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel9)
                      .addComponent(CUEPhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                  .addGroup(CUEOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel10)
                      .addComponent(CUEEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addContainerGap())
          );
  
          IDNumberLabel(CUEIDType, CUEIDNumberLabel);
  
          jPanel1.add(CUEOptionsBox);
  
          CertificadosOptionsBox.setBorder(javax.swing.BorderFactory.createTitledBorder("Certificados Configurations"));
          CertificadosOptionsBox.setName("Settings"); // NOI18N
  
          jLabel11.setText("ID Type");
  
          jLabel12.setText("NIE Number");
  
          CertificadosIDType.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "NIE", "Password" }));
  
          CertificadosIDNumber.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  CertificadosIDNumberActionPerformed(evt);
              }
          });
  
          jLabel13.setText("Full Name");
  
          CertificadosFullName.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  CertificadosFullNameActionPerformed(evt);
              }
          });
  
          jLabel14.setText("Spanish Phone Number");
  
          CertificadosPhoneNumber.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  CertificadosPhoneNumberActionPerformed(evt);
              }
          });
  
          CertificadosEmail.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  CertificadosEmailActionPerformed(evt);
              }
          });
  
          jLabel15.setText("Email Address");
  
          javax.swing.GroupLayout CertificadosOptionsBoxLayout = new javax.swing.GroupLayout(CertificadosOptionsBox);
          CertificadosOptionsBox.setLayout(CertificadosOptionsBoxLayout);
          CertificadosOptionsBoxLayout.setHorizontalGroup(
              CertificadosOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(CertificadosOptionsBoxLayout.createSequentialGroup()
                  .addGap(25, 25, 25)
                  .addGroup(CertificadosOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                      .addGroup(CertificadosOptionsBoxLayout.createSequentialGroup()
                          .addComponent(jLabel15)
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addComponent(CertificadosEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                      .addGroup(CertificadosOptionsBoxLayout.createSequentialGroup()
                          .addComponent(jLabel14)
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addComponent(CertificadosPhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                      .addGroup(CertificadosOptionsBoxLayout.createSequentialGroup()
                          .addGroup(CertificadosOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                              .addComponent(jLabel13)
                              .addComponent(jLabel11)
                              .addComponent(jLabel12))
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addGroup(CertificadosOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                              .addGroup(CertificadosOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                  .addComponent(CertificadosIDType, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                  .addComponent(CertificadosIDNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                              .addComponent(CertificadosFullName, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))))
                  .addContainerGap(91, Short.MAX_VALUE))
          );
          CertificadosOptionsBoxLayout.setVerticalGroup(
              CertificadosOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(CertificadosOptionsBoxLayout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(CertificadosOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel11)
                      .addComponent(CertificadosIDType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(CertificadosOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel12)
                      .addComponent(CertificadosIDNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(CertificadosOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel13)
                      .addComponent(CertificadosFullName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(CertificadosOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel14)
                      .addComponent(CertificadosPhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                  .addGroup(CertificadosOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel15)
                      .addComponent(CertificadosEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addContainerGap())
          );
  
          jPanel1.add(CertificadosOptionsBox);
  
          TIEIssuanceOptionsBox.setBorder(javax.swing.BorderFactory.createTitledBorder("TIE Issuance Configurations"));
          TIEIssuanceOptionsBox.setName("Settings"); // NOI18N
  
          jLabel17.setText("NIE Number");
  
          TIEIssuanceIDNumber.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIEIssuanceIDNumberActionPerformed(evt);
              }
          });
  
          jLabel18.setText("Full Name");
  
          TIEIssuanceFullName.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIEIssuanceFullNameActionPerformed(evt);
              }
          });
  
          jLabel19.setText("Spanish Phone Number");
  
          TIEIssuancePhoneNumber.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIEIssuancePhoneNumberActionPerformed(evt);
              }
          });
  
          TIEIssuanceEmail.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIEIssuanceEmailActionPerformed(evt);
              }
          });
  
          jLabel20.setText("Email Address");
  
          javax.swing.GroupLayout TIEIssuanceOptionsBoxLayout = new javax.swing.GroupLayout(TIEIssuanceOptionsBox);
          TIEIssuanceOptionsBox.setLayout(TIEIssuanceOptionsBoxLayout);
          TIEIssuanceOptionsBoxLayout.setHorizontalGroup(
              TIEIssuanceOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(TIEIssuanceOptionsBoxLayout.createSequentialGroup()
                  .addGap(25, 25, 25)
                  .addGroup(TIEIssuanceOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                      .addGroup(TIEIssuanceOptionsBoxLayout.createSequentialGroup()
                          .addComponent(jLabel20)
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addComponent(TIEIssuanceEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                      .addGroup(TIEIssuanceOptionsBoxLayout.createSequentialGroup()
                          .addComponent(jLabel19)
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addComponent(TIEIssuancePhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                      .addGroup(TIEIssuanceOptionsBoxLayout.createSequentialGroup()
                          .addGroup(TIEIssuanceOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                              .addComponent(jLabel18)
                              .addComponent(jLabel17))
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addGroup(TIEIssuanceOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                              .addComponent(TIEIssuanceIDNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)
                              .addComponent(TIEIssuanceFullName, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))))
                  .addContainerGap(91, Short.MAX_VALUE))
          );
          TIEIssuanceOptionsBoxLayout.setVerticalGroup(
              TIEIssuanceOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(TIEIssuanceOptionsBoxLayout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(TIEIssuanceOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel17)
                      .addComponent(TIEIssuanceIDNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(TIEIssuanceOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel18)
                      .addComponent(TIEIssuanceFullName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(TIEIssuanceOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel19)
                      .addComponent(TIEIssuancePhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                  .addGroup(TIEIssuanceOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel20)
                      .addComponent(TIEIssuanceEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addGap(42, 42, 42))
          );
  
          jPanel1.add(TIEIssuanceOptionsBox);
  
          TIECollectionOptionsBox.setBorder(javax.swing.BorderFactory.createTitledBorder("TIE Collection Configurations"));
          TIECollectionOptionsBox.setName("Settings"); // NOI18N
  
          jLabel21.setText("NIE Number");
  
          TIECollectionIDNumber.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIECollectionIDNumberActionPerformed(evt);
              }
          });
  
          jLabel22.setText("Full Name");
  
          TIECollectionFullName.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIECollectionFullNameActionPerformed(evt);
              }
          });
  
          jLabel23.setText("Spanish Phone Number");
  
          TIECollectionPhoneNumber.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIECollectionPhoneNumberActionPerformed(evt);
              }
          });
  
          TIECollectionEmail.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIECollectionEmailActionPerformed(evt);
              }
          });
  
          jLabel24.setText("Email Address");
  
          javax.swing.GroupLayout TIECollectionOptionsBoxLayout = new javax.swing.GroupLayout(TIECollectionOptionsBox);
          TIECollectionOptionsBox.setLayout(TIECollectionOptionsBoxLayout);
          TIECollectionOptionsBoxLayout.setHorizontalGroup(
              TIECollectionOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(TIECollectionOptionsBoxLayout.createSequentialGroup()
                  .addGap(25, 25, 25)
                  .addGroup(TIECollectionOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                      .addGroup(TIECollectionOptionsBoxLayout.createSequentialGroup()
                          .addComponent(jLabel24)
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addComponent(TIECollectionEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                      .addGroup(TIECollectionOptionsBoxLayout.createSequentialGroup()
                          .addComponent(jLabel23)
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addComponent(TIECollectionPhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                      .addGroup(TIECollectionOptionsBoxLayout.createSequentialGroup()
                          .addGroup(TIECollectionOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                              .addComponent(jLabel22)
                              .addComponent(jLabel21))
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addGroup(TIECollectionOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                              .addComponent(TIECollectionIDNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)
                              .addComponent(TIECollectionFullName, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))))
                  .addContainerGap(91, Short.MAX_VALUE))
          );
          TIECollectionOptionsBoxLayout.setVerticalGroup(
              TIECollectionOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(TIECollectionOptionsBoxLayout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(TIECollectionOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel21)
                      .addComponent(TIECollectionIDNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(TIECollectionOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel22)
                      .addComponent(TIECollectionFullName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(TIECollectionOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel23)
                      .addComponent(TIECollectionPhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                  .addGroup(TIECollectionOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel24)
                      .addComponent(TIECollectionEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addGap(42, 42, 42))
          );
  
          jPanel1.add(TIECollectionOptionsBox);
  
          TIEFingerprintsOptionsBox.setBorder(javax.swing.BorderFactory.createTitledBorder("TIE Fingerprints Configurations"));
          TIEFingerprintsOptionsBox.setName("Settings"); // NOI18N
  
          TIEFingerprintsIDNumberLabel.setText("Passport Number");
  
          TIEFingerprintsIDNumber.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIEFingerprintsIDNumberActionPerformed(evt);
              }
          });
  
          jLabel26.setText("Full Name");
  
          TIEFingerprintsFullName.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIEFingerprintsFullNameActionPerformed(evt);
              }
          });
  
          jLabel27.setText("Spanish Phone Number");
  
          TIEFingerprintsPhoneNumber.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIEFingerprintsPhoneNumberActionPerformed(evt);
              }
          });
  
          TIEFingerprintsEmail.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIEFingerprintsEmailActionPerformed(evt);
              }
          });
  
          jLabel28.setText("Email Address");
  
          TIEFingerprintsIDType.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "NIE", "Passport" }));
          TIEFingerprintsIDType.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  TIEFingerprintsIDTypeActionPerformed(evt);
              }
          });
  
          jLabel16.setText("ID Type");
  
          javax.swing.GroupLayout TIEFingerprintsOptionsBoxLayout = new javax.swing.GroupLayout(TIEFingerprintsOptionsBox);
          TIEFingerprintsOptionsBox.setLayout(TIEFingerprintsOptionsBoxLayout);
          TIEFingerprintsOptionsBoxLayout.setHorizontalGroup(
              TIEFingerprintsOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(TIEFingerprintsOptionsBoxLayout.createSequentialGroup()
                  .addGroup(TIEFingerprintsOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                      .addGroup(TIEFingerprintsOptionsBoxLayout.createSequentialGroup()
                          .addContainerGap()
                          .addComponent(jLabel16)
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addComponent(TIEFingerprintsIDType, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                      .addGroup(javax.swing.GroupLayout.Alignment.LEADING, TIEFingerprintsOptionsBoxLayout.createSequentialGroup()
                          .addGap(25, 25, 25)
                          .addGroup(TIEFingerprintsOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                              .addGroup(TIEFingerprintsOptionsBoxLayout.createSequentialGroup()
                                  .addComponent(jLabel28)
                                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                  .addComponent(TIEFingerprintsEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                              .addGroup(TIEFingerprintsOptionsBoxLayout.createSequentialGroup()
                                  .addComponent(jLabel27)
                                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                  .addComponent(TIEFingerprintsPhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))
                              .addGroup(TIEFingerprintsOptionsBoxLayout.createSequentialGroup()
                                  .addGroup(TIEFingerprintsOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                      .addComponent(jLabel26)
                                      .addComponent(TIEFingerprintsIDNumberLabel))
                                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                  .addGroup(TIEFingerprintsOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                      .addComponent(TIEFingerprintsIDNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)
                                      .addComponent(TIEFingerprintsFullName, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                  .addContainerGap(91, Short.MAX_VALUE))
          );
          TIEFingerprintsOptionsBoxLayout.setVerticalGroup(
              TIEFingerprintsOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(TIEFingerprintsOptionsBoxLayout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(TIEFingerprintsOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel16)
                      .addComponent(TIEFingerprintsIDType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(TIEFingerprintsOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(TIEFingerprintsIDNumberLabel)
                      .addComponent(TIEFingerprintsIDNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(TIEFingerprintsOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel26)
                      .addComponent(TIEFingerprintsFullName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(TIEFingerprintsOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel27)
                      .addComponent(TIEFingerprintsPhoneNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                  .addGroup(TIEFingerprintsOptionsBoxLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jLabel28)
                      .addComponent(TIEFingerprintsEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                  .addGap(42, 42, 42))
          );
  
          IDNumberLabel(TIEFingerprintsIDType, TIEFingerprintsIDNumberLabel);
  
          jPanel1.add(TIEFingerprintsOptionsBox);
  
          jScrollPane1.setViewportView(jPanel1);
  
          appointmentTypeData.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select Appointment Type...", "EU Residency Certificate (CUE)", "TIE FIngerprints", "TIE Collection", "TIE Issuance" }));
          appointmentTypeData.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  appointmentTypeDataActionPerformed(evt);
              }
          });
  
          jLabel1.setText("Appointment Type");
  
          jButton1.setText("OK");
          jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
              public void mouseClicked(java.awt.event.MouseEvent evt) {
                  jButton1MouseClicked(evt);
              }
          });
  
          jButton2.setText("Cancel");
          jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
              public void mouseClicked(java.awt.event.MouseEvent evt) {
                  jButton2MouseClicked(evt);
              }
          });
          jButton2.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(java.awt.event.ActionEvent evt) {
                  jButton2ActionPerformed(evt);
              }
          });
  
          javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
          getContentPane().setLayout(layout);
          layout.setHorizontalGroup(
              layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(layout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                      .addGroup(layout.createSequentialGroup()
                          .addComponent(jLabel1)
                          .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                          .addComponent(appointmentTypeData, 0, 318, Short.MAX_VALUE))
                      .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                  .addContainerGap())
              .addGroup(layout.createSequentialGroup()
                  .addGap(160, 160, 160)
                  .addComponent(jButton2)
                  .addGap(18, 18, 18)
                  .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
          );
          layout.setVerticalGroup(
              layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
              .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                  .addContainerGap()
                  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(appointmentTypeData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                      .addComponent(jLabel1))
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE)
                  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                      .addComponent(jButton1)
                      .addComponent(jButton2))
                  .addContainerGap())
          );
  
          updateSubMenu();
  
          pack();
      }// </editor-fold>//GEN-END:initComponents
  
      private void AlertMethodActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AlertMethodActionPerformed
          updateSubMenu();        // TODO add your handling code here:
      }//GEN-LAST:event_AlertMethodActionPerformed
  
      private void TestButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TestButtonActionPerformed
          AlertHandler ah = new AlertHandler();
          String alertMethodText = AlertMethod.getSelectedItem().toString();
          try {
              ah.alertTest(alertMethodText);
          } catch (IOException ex) {
              Logger.getLogger(CreateSettingsFile.class.getName()).log(Level.SEVERE, null, ex);
          }
      }//GEN-LAST:event_TestButtonActionPerformed
  
      private void TimeoutTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TimeoutTextActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TimeoutTextActionPerformed
  
      private void CUEIDNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CUEIDNumberActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_CUEIDNumberActionPerformed
  
      private void CUEFullNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CUEFullNameActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_CUEFullNameActionPerformed
  
      private void CUEPhoneNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CUEPhoneNumberActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_CUEPhoneNumberActionPerformed
  
      private void CUEEmailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CUEEmailActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_CUEEmailActionPerformed
  
      private void CertificadosIDNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CertificadosIDNumberActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_CertificadosIDNumberActionPerformed
  
      private void CertificadosFullNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CertificadosFullNameActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_CertificadosFullNameActionPerformed
  
      private void CertificadosPhoneNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CertificadosPhoneNumberActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_CertificadosPhoneNumberActionPerformed
  
      private void CertificadosEmailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CertificadosEmailActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_CertificadosEmailActionPerformed
  
      private void TIEIssuanceEmailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIEIssuanceEmailActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIEIssuanceEmailActionPerformed
  
      private void TIEIssuancePhoneNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIEIssuancePhoneNumberActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIEIssuancePhoneNumberActionPerformed
  
      private void TIEIssuanceFullNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIEIssuanceFullNameActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIEIssuanceFullNameActionPerformed
  
      private void TIEIssuanceIDNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIEIssuanceIDNumberActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIEIssuanceIDNumberActionPerformed
  
      private void TIECollectionIDNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIECollectionIDNumberActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIECollectionIDNumberActionPerformed
  
      private void TIECollectionFullNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIECollectionFullNameActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIECollectionFullNameActionPerformed
  
      private void TIECollectionPhoneNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIECollectionPhoneNumberActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIECollectionPhoneNumberActionPerformed
  
      private void TIECollectionEmailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIECollectionEmailActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIECollectionEmailActionPerformed
  
      private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_jButton2ActionPerformed
  
      private void appointmentTypeDataActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_appointmentTypeDataActionPerformed
          updateSubMenu();
      }//GEN-LAST:event_appointmentTypeDataActionPerformed
  
      private void TIEFingerprintsIDNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIEFingerprintsIDNumberActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIEFingerprintsIDNumberActionPerformed
  
      private void TIEFingerprintsFullNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIEFingerprintsFullNameActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIEFingerprintsFullNameActionPerformed
  
      private void TIEFingerprintsPhoneNumberActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIEFingerprintsPhoneNumberActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIEFingerprintsPhoneNumberActionPerformed
  
      private void TIEFingerprintsEmailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIEFingerprintsEmailActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_TIEFingerprintsEmailActionPerformed
  
      private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
          saveToFile();
          this.setVisible(false);
      }//GEN-LAST:event_jButton1MouseClicked
  
      private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked
          System.exit(0);
      }//GEN-LAST:event_jButton2MouseClicked
  
      private void CUEIDTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CUEIDTypeActionPerformed
          IDNumberLabel(CUEIDType, CUEIDNumberLabel);
      }//GEN-LAST:event_CUEIDTypeActionPerformed
  
      private void TIEFingerprintsIDTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TIEFingerprintsIDTypeActionPerformed
          IDNumberLabel(TIEFingerprintsIDType, TIEFingerprintsIDNumberLabel);
      }//GEN-LAST:event_TIEFingerprintsIDTypeActionPerformed
  
      private void BrowserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BrowserActionPerformed
          // TODO add your handling code here:
      }//GEN-LAST:event_BrowserActionPerformed
  
      /**
       * @param args the command line arguments
       */
      public static void main(String args[]) {
          /* Set the Nimbus look and feel */
          //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
          /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
           * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
           */
          try {
              for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                  if ("Nimbus".equals(info.getName())) {
                      javax.swing.UIManager.setLookAndFeel(info.getClassName());
                      break;
                  }
              }
          } catch (ClassNotFoundException ex) {
              java.util.logging.Logger.getLogger(CreateSettingsFile.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
          } catch (InstantiationException ex) {
              java.util.logging.Logger.getLogger(CreateSettingsFile.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
          } catch (IllegalAccessException ex) {
              java.util.logging.Logger.getLogger(CreateSettingsFile.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
          } catch (javax.swing.UnsupportedLookAndFeelException ex) {
              java.util.logging.Logger.getLogger(CreateSettingsFile.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
          }
          //</editor-fold>
  
          /* Create and display the form */
          java.awt.EventQueue.invokeLater(new Runnable() {
              public void run() {
                  new CreateSettingsFile().setVisible(true);
              }
          });
      }
      
      private void updateSubMenu(){
          CUEOptionsBox.setVisible(appointmentTypeData.getSelectedIndex() == 1);
          TIEFingerprintsOptionsBox.setVisible(appointmentTypeData.getSelectedIndex() == 2);
          TIECollectionOptionsBox.setVisible(appointmentTypeData.getSelectedIndex() == 3);
          TIEIssuanceOptionsBox.setVisible(appointmentTypeData.getSelectedIndex() == 4);
          CertificadosOptionsBox.setVisible(false);
  
      }
      
      private void saveToFile(){
          String timeOut = TimeoutText.getText();
          String alert = "";
          ArrayList<String> functions = new ArrayList<String>();
          functions.add("N/A");
          functions.add("CUE");
          functions.add("TIEFingerprint");
          functions.add("TIECollection");
          functions.add("TIEIssue");
          functions.add("Certificados");
          int alertType = AlertMethod.getSelectedIndex();
          switch(alertType){
              case 0:
                  alert = "noise";
                  break;
              case 1:
                  alert = "notify";
                  break;
          }
          String browserStr = "";
          switch (Browser.getSelectedIndex()){
              case 0:
                  browserStr = "chrome";
                  break;
              case 1:
                  browserStr = "firefox";
                  break;
              
          }
          String function = functions.get(appointmentTypeData.getSelectedIndex());
          ArrayList<String> coreOptions = new ArrayList<String>();
          String[] settingsArr = {timeOut, alert, "refresh", "yes", "Barcelona", browserStr, function};
          for(String option: settingsArr){
              coreOptions.add(option);
          }
          ArrayList<Object> functionOptions = new ArrayList<Object>();
          switch (function){
              case "CUE":
                  functionOptions.add(CUEIDType.getSelectedItem().toString());
                  if (CUEIDType.getSelectedItem().toString().toLowerCase().equals("nie")){
                      functionOptions.add("");
                      functionOptions.add(CUEIDNumber.getText());
                  }
                  else {
                      functionOptions.add(CUEIDNumber.getText());
                      functionOptions.add("");
                  }
                  functionOptions.add(CUEFullName.getText());
                  functionOptions.add(CUEPhoneNumber.getText());
                  functionOptions.add(CUEEmail.getText());
                  break;
              
              case "TIEFingerprint":
                  functionOptions.add(TIEFingerprintsIDType.getSelectedItem().toString());
                  if (TIEFingerprintsIDType.getSelectedItem().toString().toLowerCase().equals("nie")){
                      functionOptions.add("");
                      functionOptions.add(TIEFingerprintsIDNumber.getText());
                  }
                  else {
                      functionOptions.add(TIEFingerprintsIDNumber.getText());
                      functionOptions.add("");
                  }
                  functionOptions.add(TIEFingerprintsFullName.getText());
                  functionOptions.add(TIEFingerprintsPhoneNumber.getText());
                  functionOptions.add(TIEFingerprintsEmail.getText());
                  break;
                  
              case "TIECollection":
                  functionOptions.add(TIECollectionIDNumber.getText());
                  functionOptions.add(TIECollectionFullName.getText());
                  functionOptions.add(TIECollectionPhoneNumber.getText());
                  functionOptions.add(TIECollectionEmail.getText());
                  break;
              
              case "TIEIssue":
                  functionOptions.add(TIEIssuanceIDNumber.getText());
                  functionOptions.add(TIEIssuanceFullName.getText());
                  functionOptions.add(TIEIssuancePhoneNumber.getText());
                  functionOptions.add(TIEIssuanceEmail.getText());
          }
          CreateSettingsFileBackend csfb = new CreateSettingsFileBackend(function, coreOptions, functionOptions);
          csfb.start();
      }
      
      private void IDNumberLabel(javax.swing.JComboBox src, javax.swing.JLabel dst){
          String idType = src.getSelectedItem().toString();
          String labelText = idType + " Number";
          dst.setText(labelText);
      }
      
  
      // Variables declaration - do not modify//GEN-BEGIN:variables
      private javax.swing.JLabel AlertMenthodLabel;
      private javax.swing.JComboBox<String> AlertMethod;
      private javax.swing.JComboBox<String> Browser;
      private javax.swing.JLabel BrowserLabel;
      private javax.swing.JTextField CUEEmail;
      private javax.swing.JTextField CUEFullName;
      private javax.swing.JTextField CUEIDNumber;
      private javax.swing.JLabel CUEIDNumberLabel;
      private javax.swing.JComboBox<String> CUEIDType;
      private javax.swing.JPanel CUEOptionsBox;
      private javax.swing.JTextField CUEPhoneNumber;
      private javax.swing.JTextField CertificadosEmail;
      private javax.swing.JTextField CertificadosFullName;
      private javax.swing.JTextField CertificadosIDNumber;
      private javax.swing.JComboBox<String> CertificadosIDType;
      private javax.swing.JPanel CertificadosOptionsBox;
      private javax.swing.JTextField CertificadosPhoneNumber;
      private javax.swing.JPanel CoreConfigBox;
      private javax.swing.JTextField TIECollectionEmail;
      private javax.swing.JTextField TIECollectionFullName;
      private javax.swing.JTextField TIECollectionIDNumber;
      private javax.swing.JPanel TIECollectionOptionsBox;
      private javax.swing.JTextField TIECollectionPhoneNumber;
      private javax.swing.JTextField TIEFingerprintsEmail;
      private javax.swing.JTextField TIEFingerprintsFullName;
      private javax.swing.JTextField TIEFingerprintsIDNumber;
      private javax.swing.JLabel TIEFingerprintsIDNumberLabel;
      private javax.swing.JComboBox<String> TIEFingerprintsIDType;
      private javax.swing.JPanel TIEFingerprintsOptionsBox;
      private javax.swing.JTextField TIEFingerprintsPhoneNumber;
      private javax.swing.JTextField TIEIssuanceEmail;
      private javax.swing.JTextField TIEIssuanceFullName;
      private javax.swing.JTextField TIEIssuanceIDNumber;
      private javax.swing.JPanel TIEIssuanceOptionsBox;
      private javax.swing.JTextField TIEIssuancePhoneNumber;
      private javax.swing.JButton TestButton;
      private javax.swing.JLabel TimeoutLabel;
      private javax.swing.JTextField TimeoutText;
      private javax.swing.JComboBox<String> appointmentTypeData;
      private javax.swing.JButton jButton1;
      private javax.swing.JButton jButton2;
      private javax.swing.JFrame jFrame1;
      private javax.swing.JLabel jLabel1;
      private javax.swing.JLabel jLabel10;
      private javax.swing.JLabel jLabel11;
      private javax.swing.JLabel jLabel12;
      private javax.swing.JLabel jLabel13;
      private javax.swing.JLabel jLabel14;
      private javax.swing.JLabel jLabel15;
      private javax.swing.JLabel jLabel16;
      private javax.swing.JLabel jLabel17;
      private javax.swing.JLabel jLabel18;
      private javax.swing.JLabel jLabel19;
      private javax.swing.JLabel jLabel20;
      private javax.swing.JLabel jLabel21;
      private javax.swing.JLabel jLabel22;
      private javax.swing.JLabel jLabel23;
      private javax.swing.JLabel jLabel24;
      private javax.swing.JLabel jLabel26;
      private javax.swing.JLabel jLabel27;
      private javax.swing.JLabel jLabel28;
      private javax.swing.JLabel jLabel6;
      private javax.swing.JLabel jLabel8;
      private javax.swing.JLabel jLabel9;
      private javax.swing.JPanel jPanel1;
      private javax.swing.JScrollPane jScrollPane1;
      // End of variables declaration//GEN-END:variables
  }
  