code: private void pbOpenActionPerformed (java.awt.event.ActionEvent evt)//GEN-FIRST:event_pbOpenActionPerformed
      {//GEN-HEADEREND:event_pbOpenActionPerformed
          // Add your handling code here:
        pbTestActionPerformed(evt);
        if (theConnection != null)
        {
            synchronized(Main.getProperties())
            {
                int i = 0;
                while (Main.getProperties().getProperty(Main.PROPERTY_JDBCDRIVER + i) != null)
                {
                    Main.getProperties().remove(Main.PROPERTY_JDBCDRIVER + i);
                    i++;
                }
                while (Main.getProperties().getProperty(Main.PROPERTY_JDBCURL + i) != null)
                {
                    Main.getProperties().remove(Main.PROPERTY_JDBCURL + i);
                    i++;
                }
                for (i = 0; i < cmbJDBCDriver.getModel().getSize(); i++)
                    Main.getProperties().setProperty(Main.PROPERTY_JDBCDRIVER + i, cmbJDBCDriver.getModel().getElementAt(i).toString());
                for (i = 0; i < cmbJDBCURL.getModel().getSize(); i++)
                    Main.getProperties().setProperty(Main.PROPERTY_JDBCURL + i, cmbJDBCURL.getModel().getElementAt(i).toString());
                Main.getProperties().setProperty(Main.PROPERTY_JDBCUSER, tfUsername.getText());
                Main.getProperties().storeProperties("");
            }
            dispose();        
        }
      }
docs: GEN-END:initComponents