/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.visao.telas.atualiza;

import br.com.conexao.conexao;
import br.com.controle.colaboradoresControl;
import br.com.visao.telas.cadastro.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 *
 * @author Rafael Paes Leme
 */
public class colaboradores extends javax.swing.JInternalFrame {

    /**
     * Creates new form colaboradores
     */
    public colaboradores() {
        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() {

        jPanel3 = new javax.swing.JPanel();
        bt_salvar_ccolaboradores = new javax.swing.JButton();
        bt_limpar_ccolaboradores = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jtp_ccolaboradores = new javax.swing.JTabbedPane();
        jPanel5 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jLabel29 = new javax.swing.JLabel();
        cbx_busca_nome = new javax.swing.JComboBox();
        jLabel30 = new javax.swing.JLabel();
        cbx_busca_id = new javax.swing.JComboBox();
        jButton1 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        id_ccolaboradores = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        nome_ccolaboradores = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        cpf_ccolaboradores = new javax.swing.JFormattedTextField();
        jLabel4 = new javax.swing.JLabel();
        rg_ccolaboradores = new javax.swing.JFormattedTextField();
        jLabel5 = new javax.swing.JLabel();
        ctps_ccolaboradores = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        cnh_ccolaboradores = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        cnh_tipo_ccolaboradores = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        t_sang_ccolaboradores = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        cnh_vali_ccolaboradores = new javax.swing.JFormattedTextField();
        jLabel10 = new javax.swing.JLabel();
        cbx_sexo_ccolaboradores = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        tel_ccolaboradores = new javax.swing.JFormattedTextField();
        jLabel12 = new javax.swing.JLabel();
        cel_ccolaboradores = new javax.swing.JFormattedTextField();
        jLabel13 = new javax.swing.JLabel();
        outc_ccolaboradores = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        email_ccolaboradores = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        cep_ccolaboradores = new javax.swing.JFormattedTextField();
        jLabel17 = new javax.swing.JLabel();
        cidade_ccolaboradores = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        cbx_uf_ccolaboradores = new javax.swing.JComboBox();
        jLabel19 = new javax.swing.JLabel();
        setor_ccolaboradores = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        cargo_ccolaboradores = new javax.swing.JTextField();
        jLabel21 = new javax.swing.JLabel();
        funcao_ccolaboradores = new javax.swing.JTextField();
        end_ccolaboradores = new javax.swing.JTextField();
        jPanel4 = new javax.swing.JPanel();
        jLabel22 = new javax.swing.JLabel();
        cbx_confirma_ccolaboradores = new javax.swing.JComboBox();
        jLabel23 = new javax.swing.JLabel();
        bt_confirma_ccolaboradores = new javax.swing.JButton();
        cbx_perfil_ccolaboradores = new javax.swing.JComboBox();
        jLabel24 = new javax.swing.JLabel();
        login_ccolaboradores = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        confir_login_ccolaboradores = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        senha_ccolaboradores = new javax.swing.JPasswordField();
        jLabel27 = new javax.swing.JLabel();
        confi_senha_ccolaboradores = new javax.swing.JPasswordField();
        jLabel28 = new javax.swing.JLabel();
        email_senha_ccolaboradores = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        obs_ccolaboradores = new javax.swing.JTextArea();
        jLabel31 = new javax.swing.JLabel();

        setClosable(true);
        setIconifiable(true);
        setTitle("Atualização de Colaboradores");

        jPanel3.setBackground(new java.awt.Color(0, 102, 153));

        bt_salvar_ccolaboradores.setBackground(new java.awt.Color(0, 153, 204));
        bt_salvar_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 1, 14)); // NOI18N
        bt_salvar_ccolaboradores.setForeground(new java.awt.Color(255, 255, 255));
        bt_salvar_ccolaboradores.setText("ATUALIZAR");
        bt_salvar_ccolaboradores.setBorderPainted(false);
        bt_salvar_ccolaboradores.setContentAreaFilled(false);
        bt_salvar_ccolaboradores.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        bt_salvar_ccolaboradores.setOpaque(true);
        bt_salvar_ccolaboradores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_salvar_ccolaboradoresActionPerformed(evt);
            }
        });

        bt_limpar_ccolaboradores.setBackground(new java.awt.Color(0, 153, 204));
        bt_limpar_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 1, 14)); // NOI18N
        bt_limpar_ccolaboradores.setForeground(new java.awt.Color(255, 255, 255));
        bt_limpar_ccolaboradores.setText("LIMPAR");
        bt_limpar_ccolaboradores.setBorderPainted(false);
        bt_limpar_ccolaboradores.setContentAreaFilled(false);
        bt_limpar_ccolaboradores.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        bt_limpar_ccolaboradores.setOpaque(true);
        bt_limpar_ccolaboradores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_limpar_ccolaboradoresActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(bt_salvar_ccolaboradores)
                .addGap(18, 18, 18)
                .addComponent(bt_limpar_ccolaboradores)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(bt_salvar_ccolaboradores)
                    .addComponent(bt_limpar_ccolaboradores))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel1.setBackground(new java.awt.Color(204, 204, 255));

        jtp_ccolaboradores.setBackground(new java.awt.Color(255, 255, 255));
        jtp_ccolaboradores.setForeground(new java.awt.Color(0, 102, 204));
        jtp_ccolaboradores.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
        jtp_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 1, 14)); // NOI18N

        jPanel5.setBackground(new java.awt.Color(102, 153, 255));

        jPanel6.setBackground(new java.awt.Color(153, 204, 255));
        jPanel6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(51, 255, 255)));

        jLabel29.setFont(new java.awt.Font("Khmer UI", 1, 12)); // NOI18N
        jLabel29.setText("Buscar por Nome");

        cbx_busca_nome.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N
        cbx_busca_nome.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Clique aqui para carregar informações de pesquisa" }));
        cbx_busca_nome.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                cbx_busca_nomeMousePressed(evt);
            }
        });

        jLabel30.setFont(new java.awt.Font("Khmer UI", 1, 12)); // NOI18N
        jLabel30.setText("Buscar por ID");

        cbx_busca_id.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N
        cbx_busca_id.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ID" }));
        cbx_busca_id.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                cbx_busca_idMousePressed(evt);
            }
        });

        jButton1.setBackground(new java.awt.Color(0, 0, 153));
        jButton1.setFont(new java.awt.Font("Khmer UI", 1, 12)); // NOI18N
        jButton1.setForeground(new java.awt.Color(102, 255, 204));
        jButton1.setText("BUSCAR");
        jButton1.setBorderPainted(false);
        jButton1.setContentAreaFilled(false);
        jButton1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jButton1.setOpaque(true);
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel29)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cbx_busca_nome, 0, 276, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(jLabel30)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cbx_busca_id, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(107, 107, 107))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel29)
                    .addComponent(cbx_busca_nome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel30)
                    .addComponent(cbx_busca_id, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton1))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(319, Short.MAX_VALUE))
        );

        jtp_ccolaboradores.addTab("BUSCAR", jPanel5);

        jPanel2.setBackground(new java.awt.Color(102, 153, 255));

        jLabel1.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("ID");

        id_ccolaboradores.setEditable(false);
        id_ccolaboradores.setBackground(new java.awt.Color(255, 255, 204));
        id_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel2.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("Nome");

        nome_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel3.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setText("CPF");

        try {
            cpf_ccolaboradores.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        cpf_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel4.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(255, 255, 255));
        jLabel4.setText("RG");

        try {
            rg_ccolaboradores.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        rg_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel5.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setText("CTPS");

        ctps_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel6.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setText("CNH");

        cnh_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel7.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(255, 255, 255));
        jLabel7.setText("Tipo");

        cnh_tipo_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel8.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel8.setForeground(new java.awt.Color(255, 255, 255));
        jLabel8.setText("Tipo Sanguineo");

        t_sang_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel9.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel9.setForeground(new java.awt.Color(255, 255, 255));
        jLabel9.setText("Validade");

        try {
            cnh_vali_ccolaboradores.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        cnh_vali_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel10.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel10.setForeground(new java.awt.Color(255, 255, 255));
        jLabel10.setText("Sexo");

        cbx_sexo_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N
        cbx_sexo_ccolaboradores.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "M", "F" }));

        jLabel11.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel11.setForeground(new java.awt.Color(255, 255, 255));
        jLabel11.setText("Telefone");

        try {
            tel_ccolaboradores.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        tel_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel12.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel12.setForeground(new java.awt.Color(255, 255, 255));
        jLabel12.setText("Celular");

        try {
            cel_ccolaboradores.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)# ####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        cel_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel13.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel13.setForeground(new java.awt.Color(255, 255, 255));
        jLabel13.setText("Outro Contato");

        outc_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel14.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel14.setForeground(new java.awt.Color(255, 255, 255));
        jLabel14.setText("Email");

        email_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel15.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel15.setForeground(new java.awt.Color(255, 255, 255));
        jLabel15.setText("Endereço");

        jLabel16.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel16.setForeground(new java.awt.Color(255, 255, 255));
        jLabel16.setText("CEP");

        try {
            cep_ccolaboradores.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("#####-###")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        cep_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel17.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel17.setForeground(new java.awt.Color(255, 255, 255));
        jLabel17.setText("Cidade");

        cidade_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel18.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel18.setForeground(new java.awt.Color(255, 255, 255));
        jLabel18.setText("UF");

        cbx_uf_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N
        cbx_uf_ccolaboradores.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "AC ", "AL ", "AP ", "AM ", "BA ", "CE ", "DF ", "GO ", "ES ", "MA ", "MT ", "MS ", "MG ", "PA ", "PB ", "PR ", "PE ", "PI ", "RJ ", "RN ", "RS ", "RO ", "RR ", "SP ", "SC ", "SE ", "TO" }));

        jLabel19.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel19.setForeground(new java.awt.Color(255, 255, 255));
        jLabel19.setText("Setor");

        setor_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel20.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel20.setForeground(new java.awt.Color(255, 255, 255));
        jLabel20.setText("Cargo");

        cargo_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel21.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel21.setForeground(new java.awt.Color(255, 255, 255));
        jLabel21.setText("Função");

        funcao_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        end_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel19)
                    .addComponent(jLabel17)
                    .addComponent(jLabel15)
                    .addComponent(jLabel14)
                    .addComponent(jLabel11)
                    .addComponent(jLabel6)
                    .addComponent(jLabel3)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(setor_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel20)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cargo_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel21)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(funcao_ccolaboradores))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(id_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(nome_ccolaboradores)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbx_sexo_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(cpf_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(rg_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addComponent(tel_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jLabel12)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(cel_ccolaboradores))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup()
                                    .addComponent(cnh_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jLabel9)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(cnh_vali_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jLabel7))))
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addComponent(jLabel5)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(ctps_ccolaboradores))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                .addComponent(cnh_tipo_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel8)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(t_sang_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addComponent(jLabel13)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(outc_ccolaboradores))))
                    .addComponent(email_ccolaboradores)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addComponent(end_ccolaboradores)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cep_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(cidade_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 422, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbx_uf_ccolaboradores, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(id_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2)
                    .addComponent(nome_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10)
                    .addComponent(cbx_sexo_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(cpf_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)
                    .addComponent(rg_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5)
                    .addComponent(ctps_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(cnh_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(cnh_tipo_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8)
                    .addComponent(t_sang_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9)
                    .addComponent(cnh_vali_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(tel_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12)
                    .addComponent(cel_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13)
                    .addComponent(outc_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(email_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(jLabel16)
                    .addComponent(cep_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(end_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(cidade_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18)
                    .addComponent(cbx_uf_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(setor_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel20)
                    .addComponent(cargo_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel21)
                    .addComponent(funcao_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(72, Short.MAX_VALUE))
        );

        jtp_ccolaboradores.addTab("IDENTIFICAÇÕES GERAIS", jPanel2);

        jPanel4.setBackground(new java.awt.Color(102, 153, 255));

        jLabel22.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel22.setForeground(new java.awt.Color(255, 255, 255));
        jLabel22.setText("Este Colaborador é um funcionario do Sistema GOSPAD?");

        cbx_confirma_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N
        cbx_confirma_ccolaboradores.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SIM", "NÃO" }));

        jLabel23.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel23.setForeground(new java.awt.Color(255, 255, 255));
        jLabel23.setText("Perfil");

        bt_confirma_ccolaboradores.setBackground(new java.awt.Color(255, 255, 255));
        bt_confirma_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 1, 14)); // NOI18N
        bt_confirma_ccolaboradores.setText("CONFIRMA");
        bt_confirma_ccolaboradores.setBorderPainted(false);
        bt_confirma_ccolaboradores.setContentAreaFilled(false);
        bt_confirma_ccolaboradores.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        bt_confirma_ccolaboradores.setOpaque(true);
        bt_confirma_ccolaboradores.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bt_confirma_ccolaboradoresActionPerformed(evt);
            }
        });

        cbx_perfil_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N
        cbx_perfil_ccolaboradores.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Selecione Perfil", "Administrador", "Contabil", "Logistica", "Padrão", "Basico", "Bloqueado" }));

        jLabel24.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel24.setForeground(new java.awt.Color(255, 255, 255));
        jLabel24.setText("Login");

        login_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel25.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel25.setForeground(new java.awt.Color(255, 255, 255));
        jLabel25.setText("Confirma Login");

        confir_login_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel26.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel26.setForeground(new java.awt.Color(255, 255, 255));
        jLabel26.setText("Senha");

        senha_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel27.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel27.setForeground(new java.awt.Color(255, 255, 255));
        jLabel27.setText("Confirma Senha");

        confi_senha_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        jLabel28.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel28.setForeground(new java.awt.Color(255, 255, 255));
        jLabel28.setText("Email para recuperar Senha");

        email_senha_ccolaboradores.setFont(new java.awt.Font("Khmer UI", 0, 11)); // NOI18N

        obs_ccolaboradores.setColumns(20);
        obs_ccolaboradores.setRows(5);
        jScrollPane1.setViewportView(obs_ccolaboradores);

        jLabel31.setFont(new java.awt.Font("Khmer UI", 1, 11)); // NOI18N
        jLabel31.setForeground(new java.awt.Color(255, 255, 255));
        jLabel31.setText("Observação");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(75, 75, 75)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel31)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane1))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addComponent(jLabel26)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(senha_ccolaboradores))
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addComponent(jLabel24)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(login_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addComponent(jLabel25)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(confir_login_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addComponent(jLabel27)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(confi_senha_ccolaboradores))))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel23)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbx_perfil_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel22)
                        .addGap(18, 18, 18)
                        .addComponent(cbx_confirma_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(bt_confirma_ccolaboradores))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel28)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(email_senha_ccolaboradores)))
                .addContainerGap(188, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(cbx_confirma_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(bt_confirma_ccolaboradores))
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23)
                    .addComponent(cbx_perfil_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24)
                    .addComponent(login_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel25)
                    .addComponent(confir_login_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(senha_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel27)
                    .addComponent(confi_senha_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel28)
                    .addComponent(email_senha_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel31)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(65, Short.MAX_VALUE))
        );

        jtp_ccolaboradores.addTab("USUARIOS DO SISTEMA", jPanel4);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jtp_ccolaboradores, javax.swing.GroupLayout.PREFERRED_SIZE, 754, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jtp_ccolaboradores, javax.swing.GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        setBounds(0, 0, 778, 511);
    }// </editor-fold>//GEN-END:initComponents

    private void bt_salvar_ccolaboradoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_salvar_ccolaboradoresActionPerformed

        SalvarDados();

// TODO add your handling code here:
    }//GEN-LAST:event_bt_salvar_ccolaboradoresActionPerformed

    private void bt_limpar_ccolaboradoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_limpar_ccolaboradoresActionPerformed

        LimparCampos();

// TODO add your handling code here:
    }//GEN-LAST:event_bt_limpar_ccolaboradoresActionPerformed

    private void bt_confirma_ccolaboradoresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bt_confirma_ccolaboradoresActionPerformed

        BT_confirma();

// TODO add your handling code here:
    }//GEN-LAST:event_bt_confirma_ccolaboradoresActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed

        Buscar();

// TODO add your handling code here:
    }//GEN-LAST:event_jButton1ActionPerformed

    private void cbx_busca_nomeMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cbx_busca_nomeMousePressed

        cbx_busca_id.setEnabled(false);
        ListarNomes_CBX();
        cbx_busca_nome.setEnabled(true);

        // TODO add your handling code here:
    }//GEN-LAST:event_cbx_busca_nomeMousePressed

    private void cbx_busca_idMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cbx_busca_idMousePressed

        cbx_busca_nome.setEnabled(false);
        ListarId_CBX();
        cbx_busca_id.setEnabled(true);

        // TODO add your handling code here:
    }//GEN-LAST:event_cbx_busca_idMousePressed

    public void ListarNomes_CBX() {

        try {

            Connection conn = conexao.GeraConexao();

            String sql = "SELECT * FROM GOSPAD_BD.colaboradores";

            PreparedStatement comando = conn.prepareStatement(sql);

            ResultSet rs = comando.executeQuery();

            cbx_busca_nome.removeAllItems();

            while (rs.next()) {

                cbx_busca_nome.addItem(rs.getString("nome"));

            }

        } catch (Exception e) {
            e.printStackTrace();
            JOptionPane.showMessageDialog(null, e);
        }

    }

    public void ListarId_CBX() {

        try {

            Connection conn = conexao.GeraConexao();

            String sql = "SELECT * FROM GOSPAD_BD.colaboradores";

            PreparedStatement comando = conn.prepareStatement(sql);

            ResultSet rs = comando.executeQuery();
//          cbx_id_pes_usuario.removeAllItems();

            cbx_busca_id.removeAllItems();

            while (rs.next()) {

                cbx_busca_id.addItem(rs.getString("id"));

            }

        } catch (Exception e) {
            e.printStackTrace();
            JOptionPane.showMessageDialog(null, e);
        }

    }

    public void Buscar() {

        boolean nome = cbx_busca_nome.isEnabled();
        String cbxNome = (String) cbx_busca_nome.getSelectedItem();

        boolean id = cbx_busca_id.isEnabled();
        String cbxID = (String) cbx_busca_id.getSelectedItem();

        if (nome == true && id == false) {
            ListarColaboradores_Nome();
        } else if (nome == true && id == true) {
            ListarColaboradores_ID();
        } else if (nome == false && id == true) {
            ListarColaboradores_ID();
        } else if (nome == true && id == true && "Clique aqui para carregar informações de pesquisa".equals(cbxNome) && "ID".equals(cbxID)) {
            JOptionPane.showMessageDialog(null, "Erro ao Carregar Informações!\n\nFavor, insira informações para pesquisa! (Nome e ID).");
        } else if (nome == true && id == true && "Clique aqui para carregar informações de pesquisa".equals(cbxNome) && !"ID".equals(cbxID)) {
            ListarColaboradores_ID();
        } else if (nome == true && id == true && !"Clique aqui para carregar informações de pesquisa".equals(cbxNome) && "ID".equals(cbxID)) {
            ListarColaboradores_Nome();
        } else {
            JOptionPane.showMessageDialog(null, "Erro ao Carregar Informações!\n\nFavor, insira informações para pesquisa! (Nome e ID).");
        }

    }

    public void ListarColaboradores_ID() {

        String buscarID = (String) cbx_busca_id.getSelectedItem();

        try {

            if (!buscarID.equals("")) {

                Connection conn = conexao.GeraConexao();

                String sql = "SELECT * FROM GOSPAD_BD.colaboradores WHERE id = ?";

                PreparedStatement comando = conn.prepareStatement(sql);

                comando.setString(1, buscarID);

                ResultSet rs = comando.executeQuery();

                while (rs.next()) {

                    id_ccolaboradores.setText(rs.getString("id"));
                    nome_ccolaboradores.setText(rs.getString("nome"));
                    cbx_sexo_ccolaboradores.addItem(rs.getString("sexo"));
                    cpf_ccolaboradores.setText(rs.getString("cpf"));
                    rg_ccolaboradores.setText(rs.getString("rg"));
                    ctps_ccolaboradores.setText(rs.getString("ctps"));
                    cnh_ccolaboradores.setText(rs.getString("cnh"));

                    DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
                    df.setLenient(false);

                    String data_registro = df.format(rs.getDate("validade_cnh"));

                    cnh_vali_ccolaboradores.setText(String.valueOf(data_registro));

                    cnh_tipo_ccolaboradores.setText(rs.getString("tipo_cnh"));
                    t_sang_ccolaboradores.setText(rs.getString("tipo_sangue"));
                    tel_ccolaboradores.setText(rs.getString("telefone"));
                    cel_ccolaboradores.setText(rs.getString("celular"));
                    outc_ccolaboradores.setText(rs.getString("outro"));
                    email_ccolaboradores.setText(rs.getString("email"));
                    end_ccolaboradores.setText(rs.getString("endereco"));
                    cep_ccolaboradores.setText(rs.getString("cep"));
                    cidade_ccolaboradores.setText(rs.getString("cidade"));
                    cbx_uf_ccolaboradores.addItem(rs.getString("uf"));
                    setor_ccolaboradores.setText(rs.getString("setor"));
                    cargo_ccolaboradores.setText(rs.getString("cargo"));
                    funcao_ccolaboradores.setText(rs.getString("funcao"));
                    cbx_confirma_ccolaboradores.addItem(rs.getString("usuario_sistema"));
                    cbx_perfil_ccolaboradores.addItem(rs.getString("perfil"));
                    login_ccolaboradores.setText(rs.getString("login"));
                    confir_login_ccolaboradores.setText(rs.getString("conf_login"));
                    senha_ccolaboradores.setText(rs.getString("senha"));
                    confi_senha_ccolaboradores.setText(rs.getString("conf_senha"));
                    email_senha_ccolaboradores.setText(rs.getString("email_senha"));
                    obs_ccolaboradores.setText(rs.getString("observacao"));

                }

            } else {
                JOptionPane.showMessageDialog(null, "Selecione um nome!");
            }

        } catch (Exception e) {
            e.printStackTrace();
            JOptionPane.showMessageDialog(null, e);
        }

    }

    public void ListarColaboradores_Nome() {

        String buscarNome = (String) cbx_busca_nome.getSelectedItem();

        try {

            if (!buscarNome.equals("")) {

                Connection conn = conexao.GeraConexao();

                String sql = "SELECT * FROM GOSPAD_BD.colaboradores WHERE nome = ?";

                PreparedStatement comando = conn.prepareStatement(sql);

                comando.setString(1, buscarNome);

                ResultSet rs = comando.executeQuery();

                cbx_confirma_ccolaboradores.removeAllItems();
                cbx_perfil_ccolaboradores.removeAllItems();
                cbx_sexo_ccolaboradores.removeAllItems();
                cbx_uf_ccolaboradores.removeAllItems();

                while (rs.next()) {

                    id_ccolaboradores.setText(rs.getString("id"));
                    nome_ccolaboradores.setText(rs.getString("nome"));
                    cbx_sexo_ccolaboradores.addItem(rs.getString("sexo"));
                    cpf_ccolaboradores.setText(rs.getString("cpf"));
                    rg_ccolaboradores.setText(rs.getString("rg"));
                    ctps_ccolaboradores.setText(rs.getString("ctps"));
                    cnh_ccolaboradores.setText(rs.getString("cnh"));

                    DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
                    df.setLenient(false);

                    String data_registro = df.format(rs.getDate("validade_cnh"));

                    cnh_vali_ccolaboradores.setText(String.valueOf(data_registro));

                    cnh_tipo_ccolaboradores.setText(rs.getString("tipo_cnh"));
                    t_sang_ccolaboradores.setText(rs.getString("tipo_sangue"));
                    tel_ccolaboradores.setText(rs.getString("telefone"));
                    cel_ccolaboradores.setText(rs.getString("celular"));
                    outc_ccolaboradores.setText(rs.getString("outro"));
                    email_ccolaboradores.setText(rs.getString("email"));
                    end_ccolaboradores.setText(rs.getString("endereco"));
                    cep_ccolaboradores.setText(rs.getString("cep"));
                    cidade_ccolaboradores.setText(rs.getString("cidade"));
                    cbx_uf_ccolaboradores.addItem(rs.getString("uf"));
                    setor_ccolaboradores.setText(rs.getString("setor"));
                    cargo_ccolaboradores.setText(rs.getString("cargo"));
                    funcao_ccolaboradores.setText(rs.getString("funcao"));
                    cbx_confirma_ccolaboradores.addItem(rs.getString("usuario_sistema"));

                    BT_confirma();

                    cbx_perfil_ccolaboradores.addItem(rs.getString("perfil"));
                    login_ccolaboradores.setText(rs.getString("login"));
                    confir_login_ccolaboradores.setText(rs.getString("conf_login"));
                    senha_ccolaboradores.setText(rs.getString("senha"));
                    confi_senha_ccolaboradores.setText(rs.getString("conf_senha"));
                    email_senha_ccolaboradores.setText(rs.getString("email_senha"));
                    obs_ccolaboradores.setText(rs.getString("observacao"));

                }

            } else {
                JOptionPane.showMessageDialog(null, "Selecione um nome!");
            }

        } catch (Exception e) {
            e.printStackTrace();
            JOptionPane.showMessageDialog(null, e);
        }

    }

    public void LimparCampos() {

        id_ccolaboradores.setText(null);
        nome_ccolaboradores.setText(null);
        cbx_sexo_ccolaboradores.addItem(null);
        cpf_ccolaboradores.setText(null);
        rg_ccolaboradores.setText(null);
        ctps_ccolaboradores.setText(null);
        cnh_ccolaboradores.setText(null);
        cnh_vali_ccolaboradores.setText(null);
        cnh_tipo_ccolaboradores.setText(null);
        t_sang_ccolaboradores.setText(null);
        tel_ccolaboradores.setText(null);
        cel_ccolaboradores.setText(null);
        outc_ccolaboradores.setText(null);
        email_ccolaboradores.setText(null);
        end_ccolaboradores.setText(null);
        cep_ccolaboradores.setText(null);
        cidade_ccolaboradores.setText(null);
        cbx_uf_ccolaboradores.addItem(null);
        setor_ccolaboradores.setText(null);
        cargo_ccolaboradores.setText(null);
        funcao_ccolaboradores.setText(null);
        cbx_confirma_ccolaboradores.addItem(null);
        cbx_perfil_ccolaboradores.addItem(null);
        login_ccolaboradores.setText(null);
        confir_login_ccolaboradores.setText(null);
        senha_ccolaboradores.setText(null);
        confi_senha_ccolaboradores.setText(null);
        email_senha_ccolaboradores.setText(null);
        obs_ccolaboradores.setText(null);

    }

    public void BT_confirma() {

        String confirmaUsuario = (String) cbx_confirma_ccolaboradores.getSelectedItem();

        if ("NÃO".equals(confirmaUsuario)) {

            cbx_perfil_ccolaboradores.setSelectedItem("Selecione Perfil");
            cbx_perfil_ccolaboradores.setEnabled(false);
            login_ccolaboradores.setEnabled(false);
            confir_login_ccolaboradores.setEnabled(false);
            senha_ccolaboradores.setEnabled(false);
            confi_senha_ccolaboradores.setEnabled(false);
            email_senha_ccolaboradores.setEnabled(false);

        } else {

            cbx_perfil_ccolaboradores.setSelectedItem("Selecione Perfil");
            cbx_perfil_ccolaboradores.setEnabled(true);
            login_ccolaboradores.setEnabled(true);
            confir_login_ccolaboradores.setEnabled(true);
            senha_ccolaboradores.setEnabled(true);
            confi_senha_ccolaboradores.setEnabled(true);
            email_senha_ccolaboradores.setEnabled(true);

        }

    }

    public void SalvarDados() {

        //
        ArrayList<String> Registro = new ArrayList<>();
        Registro.add(id_ccolaboradores.getText());
        Registro.add(nome_ccolaboradores.getText());
        Registro.add((String) cbx_sexo_ccolaboradores.getSelectedItem());
        Registro.add(cpf_ccolaboradores.getText());
        Registro.add(rg_ccolaboradores.getText());
        Registro.add(ctps_ccolaboradores.getText());
        Registro.add(cnh_ccolaboradores.getText());

        if ("  /  /    ".equals(cnh_vali_ccolaboradores.getText())) {
            Registro.add("00/00/0000");
        } else {
            Registro.add(cnh_vali_ccolaboradores.getText());
        }
        Registro.add(cnh_tipo_ccolaboradores.getText());
        Registro.add(t_sang_ccolaboradores.getText());
        Registro.add(tel_ccolaboradores.getText());
        Registro.add(cel_ccolaboradores.getText());
        Registro.add(outc_ccolaboradores.getText());
        Registro.add(email_ccolaboradores.getText());
        Registro.add(end_ccolaboradores.getText());
        Registro.add(cep_ccolaboradores.getText());
        Registro.add(cidade_ccolaboradores.getText());
        Registro.add((String) cbx_uf_ccolaboradores.getSelectedItem());
        Registro.add(setor_ccolaboradores.getText());
        Registro.add(cargo_ccolaboradores.getText());
        Registro.add(funcao_ccolaboradores.getText());
        Registro.add((String) cbx_confirma_ccolaboradores.getSelectedItem());
        Registro.add((String) cbx_perfil_ccolaboradores.getSelectedItem());
        Registro.add(login_ccolaboradores.getText());
        Registro.add(confir_login_ccolaboradores.getText());
        Registro.add(senha_ccolaboradores.getText());
        Registro.add(confi_senha_ccolaboradores.getText());
        Registro.add(email_senha_ccolaboradores.getText());
        Registro.add(obs_ccolaboradores.getText());

        colaboradoresControl ControllerForn = new colaboradoresControl();
        try {
            //
            String confirma_usuario = (String) cbx_confirma_ccolaboradores.getSelectedItem();
            String login = login_ccolaboradores.getText();
            String confirma_login = confir_login_ccolaboradores.getText();
            String senha = senha_ccolaboradores.getText();
            String confirma_senha = confi_senha_ccolaboradores.getText();

            if ("NÃO".equals(confirma_usuario)) {

                ControllerForn.Atualizar(Registro);

            } else {

                if (login.equals(confirma_login) && senha.equals(confirma_senha)) {

                    ControllerForn.Atualizar(Registro);

                } else {

                    JOptionPane.showMessageDialog(null, "Divergencia no momento de confirmar Login e Senha. Tente Novamente!");

                }
            }

            //
// TODO add your handling code here:
        } catch (ParseException ex) {

            JOptionPane.showMessageDialog(null, "Erro Fatal! Erro, " + ex + ". Informações inseridas incorretamentes!");

            Logger.getLogger(br.com.visao.telas.cadastro.colaboradores.class.getName()).log(Level.SEVERE, null, ex);
        }

        LimparCampos();

    }


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton bt_confirma_ccolaboradores;
    private javax.swing.JButton bt_limpar_ccolaboradores;
    private javax.swing.JButton bt_salvar_ccolaboradores;
    private javax.swing.JTextField cargo_ccolaboradores;
    private javax.swing.JComboBox cbx_busca_id;
    private javax.swing.JComboBox cbx_busca_nome;
    private javax.swing.JComboBox cbx_confirma_ccolaboradores;
    private javax.swing.JComboBox cbx_perfil_ccolaboradores;
    private javax.swing.JComboBox cbx_sexo_ccolaboradores;
    private javax.swing.JComboBox cbx_uf_ccolaboradores;
    private javax.swing.JFormattedTextField cel_ccolaboradores;
    private javax.swing.JFormattedTextField cep_ccolaboradores;
    private javax.swing.JTextField cidade_ccolaboradores;
    private javax.swing.JTextField cnh_ccolaboradores;
    private javax.swing.JTextField cnh_tipo_ccolaboradores;
    private javax.swing.JFormattedTextField cnh_vali_ccolaboradores;
    private javax.swing.JPasswordField confi_senha_ccolaboradores;
    private javax.swing.JTextField confir_login_ccolaboradores;
    private javax.swing.JFormattedTextField cpf_ccolaboradores;
    private javax.swing.JTextField ctps_ccolaboradores;
    private javax.swing.JTextField email_ccolaboradores;
    private javax.swing.JTextField email_senha_ccolaboradores;
    private javax.swing.JTextField end_ccolaboradores;
    private javax.swing.JTextField funcao_ccolaboradores;
    private javax.swing.JTextField id_ccolaboradores;
    private javax.swing.JButton jButton1;
    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 jLabel2;
    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 jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTabbedPane jtp_ccolaboradores;
    private javax.swing.JTextField login_ccolaboradores;
    private javax.swing.JTextField nome_ccolaboradores;
    private javax.swing.JTextArea obs_ccolaboradores;
    private javax.swing.JTextField outc_ccolaboradores;
    private javax.swing.JFormattedTextField rg_ccolaboradores;
    private javax.swing.JPasswordField senha_ccolaboradores;
    private javax.swing.JTextField setor_ccolaboradores;
    private javax.swing.JTextField t_sang_ccolaboradores;
    private javax.swing.JFormattedTextField tel_ccolaboradores;
    // End of variables declaration//GEN-END:variables
}
