Não consigo obter o getText() de um JLabel após alterar o valor via codigo

Olá sou novo no fórum e também iniciante na programação em Java, estou criando um sistema simples de emissão de OS, porém esbarrei em um problema que não estou conseguindo resolver. No meu sistema eu possuo uma tela de login onde valida o acesso do usuário no banco de dados e verifica o nível de acesso do mesmo, esse controle de níveis de acesso serve para que o administrador diga quais sãos as permissões dentro do sistema para cada usuário. o controle básico esta perfeito de acordo com o esperado pois no cadastro de níveis se eu desmarco que o usuário não pode ter acesso ao menu de relatórios ao logar o sistema verifica na tabela de usuários o perfil e verifica na tabela de níveis de acesso as permissões e libera ou não os acessos, porem a tela de menu possui um JdesktopPane e as telas são JinternalFrames, e meu controle de acesso não consegue bloquear o acesso a por exemplo desabilitar um botão da tela de cadastro de usuários.
a logica que estou usando é que eu faço um SELECT na tabela de niveis de acesso, e todos os parametros la são booleanos, quando o usuario vendedor loga ele verifica na tabela niveis se tem acesso a cadastro de usuarios, cadastro de niveis de acesso, emissão de os e relatorios, segue linhas de codigo abaixo:

String Nquery = "select nusuarios,nacesso,nos,nrel from tab_nivel where nomenivel=?";
Nstm = Ncon.prepareStatement(Nquery);
Nstm.setString(1, rs.getString(6));
Nrs = Nstm.executeQuery();
Boolean nusuarios = Nrs.getBoolean(1);
ViewMain main = new ViewMain();
main.MenuUsuarios.setEnabled(nusuarios);

Mas quando tento fazer o mesmo com um JInternalFrame simplesmente não funciona, tentei passar o valor para uma Label do ViewMain que é o menu acessado após o login, porem quando faço o label.getText() ele me traz o valor “perfil usuario” e não o valor que eu setei em main.lblusuario.setText(rs.getString(2)); mas na tela ele traz o valor correto, sei que fui confuso ao explicar portanto se houver duvida me mande que eu tento explicar melhor, e se alguem entendeu e sabe me ajudar e dizer onde estou errando ficarei muito grato!

Poste sua classe Dao, classe Login e classe ViewMain

classe login:

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.g_system.View;

import java.sql.*;
import br.com.g_system.DAO.conecta;
import br.com.g_system.DAO.ValidConnect;
import javax.swing.JOptionPane;

/**
 *
 * @author Guilherme
 */
public class ViewLogin extends javax.swing.JFrame {

    //comandos de conexão nulos pois ainda vão ser trabalhados
    Connection con = null;
    PreparedStatement stm = null;
    ResultSet rs = null;
    Connection Ncon = null;
    PreparedStatement Nstm = null;
    ResultSet Nrs = null;
    Connection Vcon = null;
    PreparedStatement Vstm = null;
    ResultSet Vrs = null;
    Connection Vcon2 = null;
    PreparedStatement Vstm2 = null;
    ResultSet Vrs2 = null;
    String ID = "1";
    public String teste;
    public Boolean nrel;

    /**
     * Creates new form ViewLogin
     */
    public ViewLogin() {
        initComponents();
        con = conecta.getConnection();
        System.out.println(con);

        Ncon = conecta.getConnection();

        Vcon = ValidConnect.getConnection();
        System.out.println(Vcon);

        Vcon2 = ValidConnect.getConnection();
        System.out.println(Vcon2);

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

        if (con != null) {
            status.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/g_system/icones/dbok.png")));
        } else {
            status.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/g_system/icones/dberror.png")));
        }
    }

    public void logar() {
        String Query = "select * from tab_usuarios where login = ? and senha = ?";
        String Nquery = "select nusuarios, nacesso, nos, nrel from tab_nivel where nomenivel = ?";
        try {
            stm = con.prepareStatement(Query);
            stm.setString(1, CampoUsuario.getText());
            stm.setString(2, CampoSenha.getText());
            rs = stm.executeQuery();

            if (rs.next()) {
                
                
            } else {
                JOptionPane.showMessageDialog(null, "Favor digitar dados válidos de login");
                CampoUsuario.setText("");
                CampoSenha.setText("");
            }
            Nstm = Ncon.prepareStatement(Nquery);
            Nstm.setString(1, rs.getString(6));
            Nrs = Nstm.executeQuery();

            if (Nrs.next()) {
                Boolean nusuarios = Nrs.getBoolean(1);
                Boolean nacesso = Nrs.getBoolean(2);
                Boolean nos = Nrs.getBoolean(3);
                MainCadUser user = new MainCadUser();
                user.teste= Nrs.getBoolean(4);
                System.out.println(user.teste);
                nrel = Nrs.getBoolean(4);
                ViewMain main = new ViewMain();
                main.MenuUsuarios.setEnabled(nusuarios);
                main.MenuAcesso.setEnabled(nacesso);
                main.MenuOS.setVisible(nos);
                main.MenuOS.setEnabled(nos);
                main.MenuRel.setEnabled(nrel);
                main.OSPeriodo.setEnabled(nrel);
                main.OSVendedor.setEnabled(nrel);
                main.lblusuario.setText(rs.getString(2));
                main.lblperfil.setText(rs.getString(6));
                main.setVisible(true);
                this.dispose();
                
                con.close();
                Ncon.close();
                Vcon.close();
                Vcon2.close();
            }

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

    }

    public void CheckCampos() {
        if (CampoUsuario.getText().isEmpty()) {
            JOptionPane.showMessageDialog(null, "Favor preencher o campo usuario corretamente");
        }
        if (CampoSenha.getText().isEmpty()) {
            JOptionPane.showMessageDialog(null, "Favor preencher o campo senha corretamente");
        }
    }

    public void checkLicenca() {
        String sql = "UPDATE validacli SET dataacesso = now() where id =" + ID;
        String sql2 = "SELECT * from validacli where id =" + ID;
        try {

            Vstm = Vcon.prepareStatement(sql);
            Vstm.execute();

            Vstm2 = Vcon2.prepareStatement(sql2);
            Vrs2 = Vstm2.executeQuery();

            if (Vrs2.next()) {
                System.out.println("Acessou");
                Date acesso = (Date) (Vrs2.getDate(3));
                //System.out.println(acesso);
                Date licenca = (Date) (Vrs2.getDate(4));
                //System.out.println(licenca);

                if (acesso.after(licenca)) {
                    JOptionPane.showMessageDialog(null, "Licença expirada, favor entrar em contato com o departamento financeiro da G-System");
                    System.exit(0);
                }
            } else {
                JOptionPane.showMessageDialog(null, "Erro ao puxar a data da validade do sistema");
            }

        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "erro de datas" + e);
        }
    }

    public void ControlaNivel() {
    }

    /**
     * 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">                          
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        CampoUsuario = new javax.swing.JTextField();
        BtnLogin = new javax.swing.JButton();
        CampoSenha = new javax.swing.JPasswordField();
        status = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Controle de Acesso G-System");
        setResizable(false);

        jLabel1.setText("Usuário");

        jLabel2.setText("Senha");

        BtnLogin.setText("Login");
        BtnLogin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BtnLoginActionPerformed(evt);
            }
        });

        CampoSenha.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                CampoSenhaKeyPressed(evt);
            }
        });

        status.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/g_system/icones/dberror.png"))); // NOI18N

        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/com/g_system/icones/logo1.png"))); // NOI18N

        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(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(status, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(CampoSenha, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                        .addComponent(CampoUsuario))
                    .addComponent(BtnLogin, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel3))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(CampoUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(CampoSenha, 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(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(status, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(BtnLogin, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
            .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-499)/2, (screenSize.height-187)/2, 499, 187);
    }// </editor-fold>                        

    private void BtnLoginActionPerformed(java.awt.event.ActionEvent evt) {                                         
        CheckCampos();
        logar();
    }                                        

    private void CampoSenhaKeyPressed(java.awt.event.KeyEvent evt) {                                      
        if (evt.getKeyCode() == evt.VK_ENTER) {
            CheckCampos();
            logar();
        }
    }                                     

    /**
     * @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(ViewLogin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(ViewLogin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(ViewLogin.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(ViewLogin.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 ViewLogin().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify                     
    private javax.swing.JButton BtnLogin;
    private javax.swing.JPasswordField CampoSenha;
    private javax.swing.JTextField CampoUsuario;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel status;
    // End of variables declaration                   
}


classe ViewMain

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.g_system.View;

import br.com.g_system.DAO.conecta;
import java.text.DateFormat;
import java.util.Date;
import javax.swing.JOptionPane;
import java.sql.*;

/**
 *
 * @author Guilherme
 */
public class ViewMain extends javax.swing.JFrame {


    /**
     * Creates new form ViewMain
     */
    public ViewMain() {
        initComponents();
        ajuda.setText("");
        
    }


    /**
     * 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">                          
    private void initComponents() {

        jMenuItem1 = new javax.swing.JMenuItem();
        jPopupMenu1 = new javax.swing.JPopupMenu();
        jPopupMenu2 = new javax.swing.JPopupMenu();
        jMenuItem8 = new javax.swing.JMenuItem();
        Desktop = new javax.swing.JDesktopPane();
        help = new java.awt.Label();
        lblusuario = new java.awt.Label();
        lbldata = new java.awt.Label();
        ajuda = new java.awt.Label();
        lblversao = new javax.swing.JLabel();
        lblperfil = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        MenuCadastros = new javax.swing.JMenu();
        MenuUsuarios = new javax.swing.JMenuItem();
        MenuAcesso = new javax.swing.JMenuItem();
        MenuOS = new javax.swing.JMenu();
        jMenu6 = new javax.swing.JMenu();
        MenuH8 = new javax.swing.JMenuItem();
        MenuH12 = new javax.swing.JMenuItem();
        MenuFerragem = new javax.swing.JMenu();
        MenuColunas = new javax.swing.JMenuItem();
        MenuSapatas = new javax.swing.JMenuItem();
        MenuMadeira = new javax.swing.JMenuItem();
        MenuRel = new javax.swing.JMenu();
        OSPeriodo = new javax.swing.JMenuItem();
        OSVendedor = new javax.swing.JMenuItem();
        jMenu4 = new javax.swing.JMenu();
        jMenuItem5 = new javax.swing.JMenuItem();

        jMenuItem1.setText("jMenuItem1");

        jMenuItem8.setText("jMenuItem8");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("G-System");
        setBackground(new java.awt.Color(153, 204, 255));
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowActivated(java.awt.event.WindowEvent evt) {
                formWindowActivated(evt);
            }
        });

        Desktop.setBackground(new java.awt.Color(250, 198, 94));
        Desktop.setForeground(new java.awt.Color(250, 198, 94));
        Desktop.setPreferredSize(new java.awt.Dimension(1090, 610));

        help.setText("label1");

        lblusuario.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        lblusuario.setText("Usuário");
        lblusuario.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                lblusuarioMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                lblusuarioMouseExited(evt);
            }
        });

        lbldata.setFont(new java.awt.Font("Arial", 1, 36)); // NOI18N
        lbldata.setText("Data");
        lbldata.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                lbldataMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                lbldataMouseExited(evt);
            }
        });

        ajuda.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N

        lblversao.setText("Versão");

        lblperfil.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
        lblperfil.setText("Perfil Usuario");

        jMenuBar1.setBackground(new java.awt.Color(153, 204, 255));
        jMenuBar1.setForeground(new java.awt.Color(153, 204, 255));

        MenuCadastros.setText("Cadastros");
        MenuCadastros.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MenuCadastrosMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MenuCadastrosMouseExited(evt);
            }
        });
        MenuCadastros.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuCadastrosActionPerformed(evt);
            }
        });

        MenuUsuarios.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.ALT_MASK));
        MenuUsuarios.setText("Usuários");
        MenuUsuarios.setEnabled(false);
        MenuUsuarios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuUsuariosActionPerformed(evt);
            }
        });
        MenuCadastros.add(MenuUsuarios);

        MenuAcesso.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.ALT_MASK));
        MenuAcesso.setText("Nível de acesso");
        MenuAcesso.setEnabled(false);
        MenuAcesso.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuAcessoActionPerformed(evt);
            }
        });
        MenuCadastros.add(MenuAcesso);

        jMenuBar1.add(MenuCadastros);

        MenuOS.setText("Ordens de Serviço");
        MenuOS.setEnabled(false);
        MenuOS.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MenuOSMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MenuOSMouseExited(evt);
            }
        });

        jMenu6.setText("Laje");

        MenuH8.setText("H-8");
        jMenu6.add(MenuH8);

        MenuH12.setText("H-12");
        jMenu6.add(MenuH12);

        MenuOS.add(jMenu6);

        MenuFerragem.setText("Ferragem");

        MenuColunas.setText("Colunas");
        MenuColunas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MenuColunasActionPerformed(evt);
            }
        });
        MenuFerragem.add(MenuColunas);

        MenuSapatas.setText("Sapatas");
        MenuFerragem.add(MenuSapatas);

        MenuOS.add(MenuFerragem);

        MenuMadeira.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.ALT_MASK));
        MenuMadeira.setText("Madeira");
        MenuOS.add(MenuMadeira);

        jMenuBar1.add(MenuOS);

        MenuRel.setText("Relatórios");
        MenuRel.setEnabled(false);
        MenuRel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                MenuRelMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                MenuRelMouseExited(evt);
            }
        });

        OSPeriodo.setText("Ordens por período");
        OSPeriodo.setEnabled(false);
        MenuRel.add(OSPeriodo);

        OSVendedor.setText("Ordens por vendedor");
        OSVendedor.setEnabled(false);
        MenuRel.add(OSVendedor);

        jMenuBar1.add(MenuRel);

        jMenu4.setText("Utilitários");
        jMenu4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jMenu4MouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                jMenu4MouseExited(evt);
            }
        });

        jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, 0));
        jMenuItem5.setText("Sair");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        jMenu4.add(jMenuItem5);

        jMenuBar1.add(jMenu4);

        setJMenuBar(jMenuBar1);

        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)
                    .addComponent(ajuda, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(Desktop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbldata, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblusuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(lblversao)
                                    .addComponent(lblperfil)))
                            .addComponent(help, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 118, Short.MAX_VALUE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(lblusuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblperfil)
                        .addGap(43, 43, 43)
                        .addComponent(lbldata, 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)
                        .addComponent(lblversao))
                    .addComponent(Desktop, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(ajuda, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(420, 420, 420)
                .addComponent(help, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-1338)/2, (screenSize.height-723)/2, 1338, 723);
    }// </editor-fold>                        

    private void MenuColunasActionPerformed(java.awt.event.ActionEvent evt) {                                            
        // TODO add your handling code here:
    }                                           

    private void formWindowActivated(java.awt.event.WindowEvent evt) {                                     
        Date data = new Date();
        DateFormat formatador = DateFormat.getDateInstance(DateFormat.SHORT);
        lbldata.setText(formatador.format(data));
    }                                    

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {                                           
        int exit = JOptionPane.showConfirmDialog(null, "Deseja encerrar o sistema?", "Atenção", JOptionPane.YES_NO_OPTION);
        if (exit == JOptionPane.YES_OPTION) {
            ViewLogin login = new ViewLogin();
            login.setVisible(true);
            this.dispose();
        }
    }                                          

    private void MenuCadastrosMouseEntered(java.awt.event.MouseEvent evt) {                                           
        ajuda.setText("Menu para criar cadastros em geral.");
    }                                          

    private void MenuOSMouseEntered(java.awt.event.MouseEvent evt) {                                    
        ajuda.setText("Menu para criar novas ordens de serviço.");
    }                                   

    private void MenuCadastrosMouseExited(java.awt.event.MouseEvent evt) {                                          
        ajuda.setText("");
    }                                         

    private void MenuOSMouseExited(java.awt.event.MouseEvent evt) {                                   
        ajuda.setText("");
    }                                  

    private void MenuRelMouseEntered(java.awt.event.MouseEvent evt) {                                     
        ajuda.setText("Menu para gerar relatórios de controle.");
    }                                    

    private void MenuRelMouseExited(java.awt.event.MouseEvent evt) {                                    
        ajuda.setText("");
    }                                   

    private void jMenu4MouseEntered(java.awt.event.MouseEvent evt) {                                    
        ajuda.setText("Menu de utilitários do sistema.");
    }                                   

    private void lblusuarioMouseEntered(java.awt.event.MouseEvent evt) {                                        
        ajuda.setText("Nome do usuario logado.");
    }                                       

    private void lblusuarioMouseExited(java.awt.event.MouseEvent evt) {                                       
        ajuda.setText("");
    }                                      

    private void jMenu4MouseExited(java.awt.event.MouseEvent evt) {                                   
        ajuda.setText("");
    }                                  

    private void lbldataMouseEntered(java.awt.event.MouseEvent evt) {                                     
        ajuda.setText("Data atual do sistema.");
    }                                    

    private void lbldataMouseExited(java.awt.event.MouseEvent evt) {                                    
        ajuda.setText("");
    }                                   

    private void MenuCadastrosActionPerformed(java.awt.event.ActionEvent evt) {                                              
    }                                             

    private void MenuUsuariosActionPerformed(java.awt.event.ActionEvent evt) {                                             
        MainCadUser CadUser = new MainCadUser();
        CadUser.setVisible(true);
        Desktop.add(CadUser);
    }
private void MenuAcessoActionPerformed(java.awt.event.ActionEvent evt) {                                           
    MainCadNivel cad = new MainCadNivel();
    cad.setVisible(true);
    Desktop.add(cad);
}                                          

/**
 * @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(ViewMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        java.util.logging.Logger.getLogger(ViewMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        java.util.logging.Logger.getLogger(ViewMain.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
        java.util.logging.Logger.getLogger(ViewMain.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 ViewMain().setVisible(true);
        }
    });
}
// Variables declaration - do not modify                     
private javax.swing.JDesktopPane Desktop;
public static javax.swing.JMenuItem MenuAcesso;
private javax.swing.JMenu MenuCadastros;
private javax.swing.JMenuItem MenuColunas;
private javax.swing.JMenu MenuFerragem;
private javax.swing.JMenuItem MenuH12;
private javax.swing.JMenuItem MenuH8;
private javax.swing.JMenuItem MenuMadeira;
public static javax.swing.JMenu MenuOS;
public static javax.swing.JMenu MenuRel;
private javax.swing.JMenuItem MenuSapatas;
public static javax.swing.JMenuItem MenuUsuarios;
public static javax.swing.JMenuItem OSPeriodo;
public static javax.swing.JMenuItem OSVendedor;
private java.awt.Label ajuda;
private java.awt.Label help;
private javax.swing.JMenu jMenu4;
private javax.swing.JMenu jMenu6;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JMenuItem jMenuItem5;
private javax.swing.JMenuItem jMenuItem8;
private javax.swing.JPopupMenu jPopupMenu1;
private javax.swing.JPopupMenu jPopupMenu2;
private java.awt.Label lbldata;
public static javax.swing.JLabel lblperfil;
public static java.awt.Label lblusuario;
private javax.swing.JLabel lblversao;
// End of variables declaration                   

}

Classe MainCadUser

/*

  • To change this template, choose Tools | Templates
  • and open the template in the editor.
    */
    package br.com.g_system.View;

import java.sql.*;
import br.com.g_system.DAO.conecta;
import java.text.DateFormat;
import javax.swing.JOptionPane;

/**
*

  • @author Guilherme
    */
    public class MainCadUser extends javax.swing.JInternalFrame {

    Connection con = null;
    PreparedStatement stm = null;
    ResultSet rs = null;

    Connection Ccon = null;
    PreparedStatement Cstm = null;
    ResultSet Crs = null;

    Boolean Ativo,teste;

    /**

    • Creates new form MainCadUser
      */
      public MainCadUser() {
      initComponents();
      TelaDefault();

      con = conecta.getConnection();
      ViewMain main = new ViewMain();
      System.out.println(main.lblperfil.getText());
      PreencheCamposLast();

    }

    public Boolean getTeste() {
    return teste;
    }

    public void setTeste(Boolean teste) {
    this.teste = teste;
    }

    public void PreencheCamposFirst() {
    String Query = “Select * from tab_usuarios”;
    try {
    stm = con.prepareStatement(Query);
    rs = stm.executeQuery();
    if (rs.first()) {
    lblId.setText(rs.getString(1));
    java.util.Date data = new java.util.Date();
    DateFormat formatador = DateFormat.getDateInstance(DateFormat.MEDIUM);
    data = rs.getDate(7);
    lblData.setText(formatador.format(data));
    CampoNome.setText(rs.getString(2));
    CampoLogin.setText(rs.getString(3));
    CampoSenha.setText(rs.getString(4));
    CampoConfirmacao.setText(rs.getString(4));
    RadioAtivo.setSelected(rs.getBoolean(5));
    ComboNivel.removeAllItems();
    ComboNivel.addItem(rs.getString(6));
    ComboNivel.setSelectedItem(rs.getString(6));
    CampoEmail.setText(rs.getString(8));
    } else {
    JOptionPane.showMessageDialog(null, “Não foi possivel carregar corretamente o formulario, contate o suporte”);
    }
    } catch (Exception e) {
    JOptionPane.showMessageDialog(null, "Erro ao carregar campos do banco de dados, favor contatar o suporte: " + e);
    }
    }

    public void PreencheCamposLast() {
    String Query = “Select * from tab_usuarios”;
    try {
    stm = con.prepareStatement(Query);
    rs = stm.executeQuery();
    if (rs.last()) {
    lblId.setText(rs.getString(1));
    java.util.Date data = new java.util.Date();
    DateFormat formatador = DateFormat.getDateInstance(DateFormat.MEDIUM);
    data = rs.getDate(7);
    lblData.setText(formatador.format(data));
    CampoNome.setText(rs.getString(2));
    CampoLogin.setText(rs.getString(3));
    CampoSenha.setText(rs.getString(4));
    CampoConfirmacao.setText(rs.getString(4));
    RadioAtivo.setSelected(rs.getBoolean(5));
    ComboNivel.removeAllItems();
    ComboNivel.addItem(rs.getString(6));
    ComboNivel.setSelectedItem(rs.getString(6));
    CampoEmail.setText(rs.getString(8));
    } else {
    JOptionPane.showMessageDialog(null, “Não foi possivel carregar corretamente o formulario, contate o suporte”);
    }
    } catch (Exception e) {
    JOptionPane.showMessageDialog(null, "Erro ao carregar campos do banco de dados, favor contatar o suporte: " + e);
    }
    }

    public void PreencheCamposPrevious() {
    try {
    rs.previous();
    lblId.setText(rs.getString(1));
    java.util.Date data = new java.util.Date();
    DateFormat formatador = DateFormat.getDateInstance(DateFormat.MEDIUM);
    data = rs.getDate(7);
    lblData.setText(formatador.format(data));
    CampoNome.setText(rs.getString(2));
    CampoLogin.setText(rs.getString(3));
    CampoSenha.setText(rs.getString(4));
    CampoConfirmacao.setText(rs.getString(4));
    RadioAtivo.setSelected(rs.getBoolean(5));
    ComboNivel.removeAllItems();
    ComboNivel.addItem(rs.getString(6));
    ComboNivel.setSelectedItem(rs.getString(6));
    CampoEmail.setText(rs.getString(8));

     } catch (Exception e) {
     }
    

    }

    public void PreencheCamposNext() {
    try {
    rs.next();
    lblId.setText(rs.getString(1));
    java.util.Date data = new java.util.Date();
    DateFormat formatador = DateFormat.getDateInstance(DateFormat.MEDIUM);
    data = rs.getDate(7);
    lblData.setText(formatador.format(data));
    CampoNome.setText(rs.getString(2));
    CampoLogin.setText(rs.getString(3));
    CampoSenha.setText(rs.getString(4));
    CampoConfirmacao.setText(rs.getString(4));
    RadioAtivo.setSelected(rs.getBoolean(5));
    ComboNivel.removeAllItems();
    ComboNivel.addItem(rs.getString(6));
    ComboNivel.setSelectedItem(rs.getString(6));
    CampoEmail.setText(rs.getString(8));

     } catch (Exception e) {
     }
    

    }

    public void PreencheComboNivel() {
    ComboNivel.removeAllItems();
    String Query = “select * from tab_nivel”;
    try {
    stm = con.prepareStatement(Query);
    rs = stm.executeQuery();
    while (rs != null && rs.next()) {
    ComboNivel.addItem(rs.getString(6));
    }
    ComboNivel.updateUI();
    } catch (Exception e) {
    }
    }

    public boolean CheckCampos() {
    if (CampoNome.getText().isEmpty() || CampoLogin.getText().isEmpty() || CampoSenha.getText().isEmpty() || CampoConfirmacao.getText().isEmpty()) {

         return false;
     } else {
         return true;
     }
    

    }

    public boolean CheckLoginDuplicidade(String login) {
    String Query = “select * from tab_usuarios where login =?”;
    Boolean Check = null;
    try {
    stm = con.prepareStatement(Query);
    stm.setString(1, login);
    rs = stm.executeQuery();
    if (rs.next()) {
    Check = true;
    } else {
    Check = false;
    }

     } catch (Exception e) {
     }
     return Check;
    

    }
    public void CheckAcesso(){
    String Query = “select * from tab_usuarios where perfil =?”;
    try {

     } catch (Exception e) {
     }
    

    }

    public void TelaDefault() {
    BtnFirst.setEnabled(true);
    BtnPrevious.setEnabled(true);
    BtnSearch.setEnabled(true);
    BtnNext.setEnabled(true);
    BtnLast.setEnabled(true);
    BtnNovo.setEnabled(true);
    BtnAlterar.setEnabled(true);
    BtnGravar.setEnabled(false);
    BtnSalvarAlt.setEnabled(false);
    BtnCancelar.setEnabled(true);
    CampoNome.setEnabled(false);

     BtnExcluir.setEnabled(true);
     CampoLogin.setEnabled(false);
     CampoSenha.setEnabled(false);
     CampoConfirmacao.setEnabled(false);
     ComboNivel.setEnabled(false);
     CampoEmail.setEnabled(false);
     RadioAtivo.setEnabled(false);
    

    }

    public void HabilitarCadastro() {
    BtnFirst.setEnabled(false);
    BtnPrevious.setEnabled(false);
    BtnSearch.setEnabled(false);
    BtnNext.setEnabled(false);
    BtnLast.setEnabled(false);
    BtnNovo.setEnabled(false);
    BtnAlterar.setEnabled(false);
    BtnGravar.setEnabled(true);
    BtnSalvarAlt.setEnabled(false);
    BtnExcluir.setEnabled(false);
    BtnCancelar.setEnabled(true);
    CampoNome.setEnabled(true);
    CampoLogin.setEnabled(true);
    CampoSenha.setEnabled(true);
    CampoConfirmacao.setEnabled(true);
    ComboNivel.setEnabled(true);
    CampoEmail.setEnabled(true);
    RadioAtivo.setEnabled(true);
    }

    public void HabilitarEdicao() {
    BtnFirst.setEnabled(false);
    BtnPrevious.setEnabled(false);
    BtnSearch.setEnabled(false);
    BtnNext.setEnabled(false);
    BtnLast.setEnabled(false);
    BtnNovo.setEnabled(false);
    BtnAlterar.setEnabled(false);
    BtnGravar.setEnabled(false);
    BtnSalvarAlt.setEnabled(true);
    BtnExcluir.setEnabled(false);
    BtnCancelar.setEnabled(true);
    CampoNome.setEnabled(true);
    CampoLogin.setEnabled(true);
    CampoSenha.setEnabled(true);
    CampoConfirmacao.setEnabled(true);
    ComboNivel.setEnabled(true);
    CampoEmail.setEnabled(true);
    RadioAtivo.setEnabled(true);
    }

    /**

    • 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”)
      //
      private void initComponents() {

      jLabel1 = new javax.swing.JLabel();
      lblId = new javax.swing.JLabel();
      jLabel3 = new javax.swing.JLabel();
      lblData = new javax.swing.JLabel();
      jLabel5 = new javax.swing.JLabel();
      jLabel6 = new javax.swing.JLabel();
      jLabel7 = new javax.swing.JLabel();
      jLabel8 = new javax.swing.JLabel();
      jLabel10 = new javax.swing.JLabel();
      jLabel11 = new javax.swing.JLabel();
      jLabel12 = new javax.swing.JLabel();
      BtnLast = new javax.swing.JButton();
      BtnNext = new javax.swing.JButton();
      BtnPrevious = new javax.swing.JButton();
      BtnFirst = new javax.swing.JButton();
      BtnSearch = new javax.swing.JButton();
      BtnAlterar = new javax.swing.JButton();
      BtnNovo = new javax.swing.JButton();
      BtnExcluir = new javax.swing.JButton();
      BtnCancelar = new javax.swing.JButton();
      BtnGravar = new javax.swing.JButton();
      CampoNome = new javax.swing.JTextField();
      CampoLogin = new javax.swing.JTextField();
      CampoSenha = new javax.swing.JPasswordField();
      CampoConfirmacao = new javax.swing.JPasswordField();
      CampoEmail = new javax.swing.JTextField();
      ComboNivel = new javax.swing.JComboBox();
      RadioAtivo = new javax.swing.JRadioButton();
      BtnSalvarAlt = new javax.swing.JButton();

      setPreferredSize(new java.awt.Dimension(1090, 610));

      jLabel1.setText(“ID”);

      lblId.setText(“ID”);

      jLabel3.setText("Ultima Alteração: ");

      lblData.setText(“Data”);

      jLabel5.setFont(new java.awt.Font(“Arial”, 1, 14)); // NOI18N
      jLabel5.setText("* Nome:");

      jLabel6.setFont(new java.awt.Font(“Arial”, 1, 14)); // NOI18N
      jLabel6.setText("* Login:");

      jLabel7.setFont(new java.awt.Font(“Arial”, 1, 14)); // NOI18N
      jLabel7.setText("* Senha:");

      jLabel8.setFont(new java.awt.Font(“Arial”, 1, 14)); // NOI18N
      jLabel8.setText("* Confirmação de Senha:");

      jLabel10.setFont(new java.awt.Font(“Arial”, 1, 14)); // NOI18N
      jLabel10.setText("* Nivel de Acesso:");

      jLabel11.setFont(new java.awt.Font(“Arial”, 1, 14)); // NOI18N
      jLabel11.setText(“E-mail:”);

      jLabel12.setFont(new java.awt.Font(“Arial”, 1, 14)); // NOI18N
      jLabel12.setText("Ativo: ");

      BtnLast.setText(“jButton1”);
      BtnLast.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
      BtnLastActionPerformed(evt);
      }
      });

      BtnNext.setText(“jButton1”);
      BtnNext.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
      BtnNextActionPerformed(evt);
      }
      });

      BtnPrevious.setText(“jButton1”);
      BtnPrevious.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
      BtnPreviousActionPerformed(evt);
      }
      });

      BtnFirst.setText(“jButton1”);
      BtnFirst.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
      BtnFirstActionPerformed(evt);
      }
      });

      BtnSearch.setText(“jButton1”);

      BtnAlterar.setFont(new java.awt.Font(“Arial”, 0, 14)); // NOI18N
      BtnAlterar.setText(“Alterar”);
      BtnAlterar.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
      BtnAlterarActionPerformed(evt);
      }
      });

      BtnNovo.setFont(new java.awt.Font(“Arial”, 0, 14)); // NOI18N
      BtnNovo.setText(“Novo”);
      BtnNovo.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
      BtnNovoActionPerformed(evt);
      }
      });

      BtnExcluir.setFont(new java.awt.Font(“Arial”, 0, 14)); // NOI18N
      BtnExcluir.setText(“Excluir”);
      BtnExcluir.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
      BtnExcluirActionPerformed(evt);
      }
      });

      BtnCancelar.setFont(new java.awt.Font(“Arial”, 0, 14)); // NOI18N
      BtnCancelar.setText(“Cancelar”);
      BtnCancelar.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
      BtnCancelarActionPerformed(evt);
      }
      });

      BtnGravar.setFont(new java.awt.Font(“Arial”, 0, 14)); // NOI18N
      BtnGravar.setText(“Gravar”);
      BtnGravar.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
      BtnGravarActionPerformed(evt);
      }
      });

      ComboNivel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { “Item 1”, “Item 2”, “Item 3”, “Item 4” }));

      RadioAtivo.setText(“Sim”);

      BtnSalvarAlt.setFont(new java.awt.Font(“Arial”, 0, 14)); // NOI18N
      BtnSalvarAlt.setText(“Salvar Alterações”);
      BtnSalvarAlt.addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent evt) {
      BtnSalvarAltActionPerformed(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.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
      .addGroup(layout.createSequentialGroup()
      .addComponent(jLabel1)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
      .addComponent(lblId)
      .addGap(106, 106, 106)
      .addComponent(jLabel3)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addComponent(lblData))
      .addGroup(layout.createSequentialGroup()
      .addComponent(jLabel11)
      .addGap(18, 18, 18)
      .addComponent(CampoEmail, javax.swing.GroupLayout.PREFERRED_SIZE, 763, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addGroup(layout.createSequentialGroup()
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
      .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
      .addComponent(jLabel10)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
      .addComponent(ComboNivel, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
      .addComponent(jLabel7)
      .addGap(18, 18, 18)
      .addComponent(CampoSenha, javax.swing.GroupLayout.PREFERRED_SIZE, 286, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.LEADING))
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
      .addComponent(jLabel8)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addComponent(CampoConfirmacao))
      .addGroup(layout.createSequentialGroup()
      .addComponent(jLabel5)
      .addGap(18, 18, 18)
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
      .addComponent(CampoLogin, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 756, Short.MAX_VALUE)
      .addComponent(CampoNome, javax.swing.GroupLayout.Alignment.TRAILING))))
      .addGroup(layout.createSequentialGroup()
      .addComponent(jLabel12)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
      .addComponent(RadioAtivo)))
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
      .addComponent(BtnFirst, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addComponent(BtnPrevious, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addComponent(BtnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addComponent(BtnNext, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addComponent(BtnLast, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addComponent(BtnNovo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(BtnAlterar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(BtnExcluir, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(BtnCancelar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(BtnGravar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(BtnSalvarAlt, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addContainerGap())
      );
      layout.setVerticalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createSequentialGroup()
      .addContainerGap()
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
      .addComponent(jLabel1)
      .addComponent(lblId)
      .addComponent(jLabel3)
      .addComponent(lblData))
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
      .addComponent(BtnLast)
      .addComponent(BtnNext)
      .addComponent(BtnPrevious)
      .addComponent(BtnFirst)
      .addComponent(BtnSearch)))
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
      .addComponent(jLabel5)
      .addComponent(BtnNovo, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(CampoNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addGap(20, 20, 20)
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
      .addComponent(jLabel6)
      .addComponent(BtnAlterar, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(CampoLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addGap(21, 21, 21)
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
      .addComponent(jLabel7)
      .addComponent(jLabel8)
      .addComponent(BtnGravar, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(CampoSenha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(CampoConfirmacao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addGap(18, 18, 18)
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
      .addGroup(layout.createSequentialGroup()
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
      .addComponent(jLabel12)
      .addComponent(RadioAtivo))
      .addGap(66, 66, 66)
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
      .addComponent(jLabel10)
      .addComponent(ComboNivel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addGap(45, 45, 45))
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
      .addComponent(BtnSalvarAlt, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
      .addComponent(BtnExcluir, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addGap(18, 18, 18)))
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
      .addComponent(jLabel11)
      .addComponent(CampoEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addGap(24, 24, 24)
      .addComponent(BtnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addGap(16, 16, 16))
      );

      pack();
      }//

    private void BtnNovoActionPerformed(java.awt.event.ActionEvent evt) {
    HabilitarCadastro();
    lblId.setText("");
    lblData.setText("");
    CampoNome.setText("");
    CampoLogin.setText("");
    CampoSenha.setText("");
    CampoConfirmacao.setText("");
    RadioAtivo.setSelected(true);
    CampoEmail.setText("");
    PreencheComboNivel();
    System.out.println(ComboNivel.getSelectedItem().toString());
    }

    private void BtnGravarActionPerformed(java.awt.event.ActionEvent evt) {
    CheckCampos();

     if (CheckCampos() == true) {
         
             if (CheckLoginDuplicidade(CampoLogin.getText()) == false && CampoSenha.getText().equals(CampoConfirmacao.getText())) {
                 String Query = "insert into tab_usuarios(nome, login, senha, ativo, perfil, datahora, email) values(?,?,?,?,?,now(),?)";
                 try {
                     stm = con.prepareStatement(Query);
                     stm.setString(1, CampoNome.getText());
                     stm.setString(2, CampoLogin.getText());
                     stm.setString(3, CampoSenha.getText());
                     if (RadioAtivo.isSelected()) {
                         Ativo = true;
                     } else {
                         Ativo = false;
                     }
                     stm.setBoolean(4, Ativo);
                     stm.setString(5, ComboNivel.getSelectedItem().toString());
                     stm.setString(6, CampoEmail.getText());
                     stm.execute();
                     JOptionPane.showMessageDialog(null, "Usuario cadastrado com sucesso!");
    
                 } catch (Exception e) {
                     JOptionPane.showMessageDialog(null, "Erro ao gravar os dados no banco" + e);
                 }
    
    
                 TelaDefault();
             } else {
                 JOptionPane.showMessageDialog(null, "Dados do login e/ou senha inválidos");
             }
         
     } else {
         JOptionPane.showMessageDialog(null, "Preencha todos os campos obrigatórios");
     }//depois do checkcampos
    

    }

private void BtnLastActionPerformed(java.awt.event.ActionEvent evt) {                                        
    PreencheCamposLast();
}                                       

private void BtnFirstActionPerformed(java.awt.event.ActionEvent evt) {                                         
    PreencheCamposFirst();
}                                        

private void BtnNextActionPerformed(java.awt.event.ActionEvent evt) {                                        
    PreencheCamposNext();
}                                       

private void BtnPreviousActionPerformed(java.awt.event.ActionEvent evt) {                                            
    PreencheCamposPrevious();
}                                           

private void BtnAlterarActionPerformed(java.awt.event.ActionEvent evt) {                                           
    HabilitarEdicao();
    PreencheComboNivel();
}                                          

private void BtnSalvarAltActionPerformed(java.awt.event.ActionEvent evt) {                                             
    
    if (CampoSenha.getText().equals(CampoConfirmacao.getText())) {
        String Query = "update tab_usuarios set nome=?, login=?, senha=?, ativo=?, perfil=?, datahora = now(), email =? where id = ?";
        try {
            stm = con.prepareStatement(Query);
            stm.setString(1, CampoNome.getText());
            stm.setString(2, CampoLogin.getText());
            stm.setString(3, CampoSenha.getText());
            if (RadioAtivo.isSelected() == true) {
                Ativo = true;
            } else {
                Ativo = false;
            }
            stm.setBoolean(4, Ativo);
            stm.setString(5, ComboNivel.getSelectedItem().toString());
            stm.setString(6, CampoEmail.getText());
            stm.setString(7, lblId.getText());
            stm.execute();
            JOptionPane.showMessageDialog(null, "Usuario atualizado com sucesso!");
            TelaDefault();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "Erro ao atualizar os campos no banco de dados: "+e);
        }
    }else{
    JOptionPane.showMessageDialog(null, "Favor digitar a mesma senha para os dois campos!");
    }
}                                            

private void BtnExcluirActionPerformed(java.awt.event.ActionEvent evt) {                                           
    int confirma = JOptionPane.showConfirmDialog(null, "Confirma a exclusão do cadastro?","Atenção!", JOptionPane.YES_NO_OPTION);
    if(confirma == JOptionPane.YES_OPTION){
    String Query = "delete from tab_usuarios where id =?";
        try {
            stm = con.prepareStatement(Query);
            stm.setString(1, lblId.getText());
            stm.execute();
            JOptionPane.showMessageDialog(null, "Usuário removido com sucesso!");
            PreencheCamposLast();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "Erro ao efetuar a exclusão do registro: "+e);
        }
    }
}                                          

private void BtnCancelarActionPerformed(java.awt.event.ActionEvent evt) {                                            
    this.dispose();
}                                           

// Variables declaration - do not modify                     
private javax.swing.JButton BtnAlterar;
private javax.swing.JButton BtnCancelar;
public static javax.swing.JButton BtnExcluir;
private javax.swing.JButton BtnFirst;
private javax.swing.JButton BtnGravar;
private javax.swing.JButton BtnLast;
private javax.swing.JButton BtnNext;
private javax.swing.JButton BtnNovo;
private javax.swing.JButton BtnPrevious;
private javax.swing.JButton BtnSalvarAlt;
private javax.swing.JButton BtnSearch;
private javax.swing.JPasswordField CampoConfirmacao;
private javax.swing.JTextField CampoEmail;
private javax.swing.JTextField CampoLogin;
private javax.swing.JTextField CampoNome;
private javax.swing.JPasswordField CampoSenha;
private javax.swing.JComboBox ComboNivel;
private javax.swing.JRadioButton RadioAtivo;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel lblData;
private javax.swing.JLabel lblId;
// End of variables declaration                   

}

Ainda não olhei seu código, mas pelo que diz são dois labels diferentes:

label e lblusuario.

Duas dicas:
1 - Já que está manipulando labels, renomeie todos com um padrão: lblNome, lblUsuario, etc;
2 - Coloque o nome das colunas do BD quando estiver recuperando um ResultSet, ao invés de colocar um int:

main.lblusuario.setText(rs.getString("nomeDaColunaDaTabela"));

Aplicando essas duas dicas, provavelmente corrigirá seu problema.
1 - Acredito que esteja referenciando um label diferente;
2 - Ou recupera a coluna errada do BD e seta no label.

não, é a mesma label, eu escrevi errado quando disse apenas label

Veja se está recuperando a coluna certa da tabela.

ele traz as informações corretas, o problema é que criei o lblusuario ao logar vem com o valor correto, assim como o lblperfil, porém se eu crio um System.out.println(lblusuario) na classe ViewMain ele me retorna Perfil Usuario, que ´o valor que eu coloquei quando criei a label pelo netbeans, mas rodando ele fica escrito o usuario que logou e o perfil dele

Faça um select da sua tabela e poste

Não encontrei o lugar onde você tenta recuperar o texto de lblusuario.
Mas caso em algum lugar tente recuperar, tem que referenciar o objeto main.
Apenas na janela com o nome main vai conseguir recuperar o valor que setou no inicio.

id nome login senha ativo Perfil datahora email
1 Desenvolvedor G-system Desenvolvedor 123 1 Desenvolvedor 2017-05-23 22:26:31 guih.rr@gmail.com
2 Guilherme R guilherme 123 1 Desenvolvedor 2017-05-23 19:17:31 NULL
6 Janaina P janaina 123 1 Vendedor 2017-05-26 18:15:08 janaina@g-system.com.br

eu pra falar a verdade eu exclui a tentativa por não obter sucesso, fiz como manda a regra, ViewMain menu = new ViewMain();
e a lblperfil e lblusuario estão como publicas

Entao,

Observe que o label que vc setou é do objeto chamado main:

ViewMain main = new ViewMain();
main.lblusuario.setText(rs.getString(2));

Já quando vc tentou retornar, vc criou um novo objeto chamado menu:

ViewMain menu = new ViewMain();

Os objetos menu e main são do mesmo tipo, porém com valores diferentes. Nâo importa se os labels são públicos, isso é questão de acesso.

repare no método logar() eu tentei criar em cima o MainCadUser user = new MainCadUser(); user.BtnExcluir.setEnabled(nrel); e fui no método teladefault() do MainCadUser e comentei o trecho que trazia BtnExcluir.setEnabled(true); mas não funcionou, ai fiz um System.out.println(); para me dizer qual valor esta passando para ViewLogin nrel, fazendo um ViewLogin login = new ViewLogin(); System.out.println(login.nrel); mas me retorna valor null

Olá, creio que o fabio já explicou o problema.
Objetos são conceitos básico do Java.
1 objeto pode ser criado mais de uma vez, tendo as mesmas caracteristicas, só que sendo objetos diferentes.
Exemplo: PessoaObjeto pessoaObjetoCriado = new PessoaObjeto();
PessoaObjeto pessoaObjetoCriado2 = new PessoaObjeto();
agora você possui 2 objetos diferentes, podendo colocar cpf para cada um, e pegar o valor de cada um.
o que aconteceu é que voce fez um objeto chamado main, e setou a label.
mas quando vc abre a tela de login, e loga com sucesso você faz isso:
ViewMain main = new ViewMain();
main.MenuUsuarios.setEnabled(nusuarios);
Já é outro objeto, já é outra realidade…

Uma solução elegante para isso seria assim.
ViewLogin login = new ViewLogin(this);
onde o this é o frame MAIN.
na classe viewlogin coloque um objeto main setado para nullo.
ViewMain main = null;
//Logo após o construtor.
public ViewLogin(ViewMain main){
//carregue agora seu main com este.
this.main = main;
}
// e pronto. agora quando vc der o main.MenuUsuarios.setEnabled(nusuarios);
main.MenuAcesso.setEnabled(nacesso);
main.MenuOS.setVisible(nos);
main.MenuOS.setEnabled(nos);
main.MenuRel.setEnabled(nrel);
e etc vc estara fazendo para o MAIN que você realmente quer fazer.
ai qnd der o main.setVisible(true) e o this.dispose() vai está como você quer.

Pra falar a vdd eu consegui resolver, acho que não consegui expressar corretamente o que eu queria, mas acabei criando uma String pública na classe ViewMain e quando liga o sistema passa o valor do perfil de acesso do usuário para essa String, que por sua vez é usada no botão que chama o cadastro de usuário para fazer a consulta na tabela de controle de acesso e verificar as permissões