Banco De Dados

Preciso cadastrar os dados que o usuário coloca na tela cadastro e salva-lo no banco de dados, porém da erro quando clico em salvar. Segue abaixo o código da tela cadastro.

package view;

import factory.UsuarioDAO;
import javax.swing.JOptionPane;
import modelo.Usuario;

/**
 *
 * @author carlos.coutinho
 */
public class TelaCadastro extends javax.swing.JFrame {

    /**
     * Creates new form TelaCadastro
     */
    public TelaCadastro() {
        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">                          
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txtNome = new javax.swing.JTextField();
        txtEmail = new javax.swing.JTextField();
        jPSenha = new javax.swing.JPasswordField();
        txtDataNasc = new javax.swing.JFormattedTextField();
        txtCpf = new javax.swing.JFormattedTextField();
        jLabel7 = new javax.swing.JLabel();
        jBLimpar = new javax.swing.JButton();
        jRMasculino = new javax.swing.JRadioButton();
        jRFeminino = new javax.swing.JRadioButton();
        jBCadastrar = new javax.swing.JButton();
        jBRetornar = new javax.swing.JButton();
        jLabel8 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(500, 441));
        setResizable(false);
        getContentPane().setLayout(null);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("NOME:");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(40, 80, 34, 14);

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("DATA NASCIMENTO:");
        getContentPane().add(jLabel2);
        jLabel2.setBounds(40, 110, 110, 30);

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setText("E-MAIL:");
        getContentPane().add(jLabel3);
        jLabel3.setBounds(40, 150, 43, 30);

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel4.setForeground(new java.awt.Color(255, 255, 255));
        jLabel4.setText("CPF:");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(40, 190, 30, 20);

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setText("SEXO:");
        getContentPane().add(jLabel5);
        jLabel5.setBounds(40, 230, 40, 20);

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setText("SENHA:");
        getContentPane().add(jLabel6);
        jLabel6.setBounds(40, 260, 40, 30);

        txtNome.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtNomeActionPerformed(evt);
            }
        });
        getContentPane().add(txtNome);
        txtNome.setBounds(100, 70, 370, 30);
        getContentPane().add(txtEmail);
        txtEmail.setBounds(100, 150, 365, 30);
        getContentPane().add(jPSenha);
        jPSenha.setBounds(100, 260, 360, 30);

        try {
            txtDataNasc.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        txtDataNasc.setDragEnabled(true);
        txtDataNasc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtDataNascActionPerformed(evt);
            }
        });
        getContentPane().add(txtDataNasc);
        txtDataNasc.setBounds(170, 110, 299, 30);

        try {
            txtCpf.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        getContentPane().add(txtCpf);
        txtCpf.setBounds(100, 190, 365, 30);

        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 48)); // NOI18N
        jLabel7.setForeground(new java.awt.Color(255, 255, 255));
        jLabel7.setText("CADASTRO");
        getContentPane().add(jLabel7);
        jLabel7.setBounds(110, 0, 265, 58);

        jBLimpar.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jBLimpar.setText("LIMPAR");
        jBLimpar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBLimparActionPerformed(evt);
            }
        });
        getContentPane().add(jBLimpar);
        jBLimpar.setBounds(100, 310, 120, 50);

        jRMasculino.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jRMasculino.setForeground(new java.awt.Color(255, 255, 255));
        jRMasculino.setText("MASCULINO");
        getContentPane().add(jRMasculino);
        jRMasculino.setBounds(100, 230, 100, 23);

        jRFeminino.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jRFeminino.setForeground(new java.awt.Color(255, 255, 255));
        jRFeminino.setText("FEMININO");
        getContentPane().add(jRFeminino);
        jRFeminino.setBounds(230, 230, 90, 23);

        jBCadastrar.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jBCadastrar.setText("CADASTRAR");
        jBCadastrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCadastrarActionPerformed(evt);
            }
        });
        getContentPane().add(jBCadastrar);
        jBCadastrar.setBounds(280, 310, 110, 50);

        jBRetornar.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        jBRetornar.setText("RETORNAR");
        jBRetornar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBRetornarActionPerformed(evt);
            }
        });
        getContentPane().add(jBRetornar);
        jBRetornar.setBounds(367, 380, 110, 23);

        jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/view/Papel-de-Parede-fundo-azul-petroleo-com-mosaicos-35673.jpg"))); // NOI18N
        jLabel8.setText("jLabel8");
        getContentPane().add(jLabel8);
        jLabel8.setBounds(0, 0, 500, 440);

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>                        

    private void jBLimparActionPerformed(java.awt.event.ActionEvent evt) {                                         
        txtNome.setText("");
        txtDataNasc.setText("");
        txtEmail.setText("");
        txtCpf.setText("");
        jRMasculino.setText("");
        jRFeminino.setText("");
        jPSenha.setText("");
        
    }                                        

    private void jBCadastrarActionPerformed(java.awt.event.ActionEvent evt) {                                            
        Usuario usuarios = new Usuario();
        usuarios.setNome(txtNome.getText());
        usuarios.setDtNascimento(txtDataNasc.getText());
        usuarios.seteMail(txtEmail.getText());
        usuarios.setCpf(txtCpf.getText());
        usuarios.setSexo(jRMasculino.getText());
        usuarios.setSexo(jRFeminino.getText());
        usuarios.setSenha(jPSenha.getText());
        
            
            if((txtNome.getText().isEmpty()) || (txtDataNasc.getText().isEmpty())|| (txtEmail.getText().isEmpty())|| (txtCpf.getText().isEmpty())||(jRMasculino.getText().isEmpty())||(jRFeminino.getText().isEmpty())||(jPSenha.getText().isEmpty())){
                    JOptionPane.showMessageDialog(null, "CAMPOS VAZIO, FAVOR PREENCHE-LOS PARA CONTINUAR","ERRO.!!",JOptionPane.ERROR_MESSAGE);
            }
                else{
                this.hide();
                    TelaInicial t = new TelaInicial();
                    t.setVisible(true);
                    UsuarioDAO u = new UsuarioDAO();
                    Usuario user = new Usuario(txtNome.getText(),txtDataNasc.getText(), txtEmail.getText(),txtCpf.getText(),jPSenha.getText());
                    u.insert(user);

                }
        JOptionPane.showMessageDialog(this, "Cadastrado com sucesso!!!");

    }                                           

    private void txtDataNascActionPerformed(java.awt.event.ActionEvent evt) {                                            

        
        
    }                                           

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

    private void jBRetornarActionPerformed(java.awt.event.ActionEvent evt) {                                           
        TelaInicial ti = new TelaInicial();
        ti.setVisible(true);
        this.pack();
        dispose();
    }                                          

    
    /**
     * @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(TelaCadastro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(TelaCadastro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(TelaCadastro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(TelaCadastro.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 TelaCadastro().setVisible(true);
            }
        });
    }

Qual o erro?

quando cadastra aparece o erro abaixo, no caso não cadastra no banco.

run:
Exception in thread “AWT-EventQueue-0” java.lang.UnsupportedOperationException: Not supported yet.
at modelo.Usuario.(Usuario.java:27)
at view.TelaCadastro.jBCadastrarActionPerformed(TelaCadastro.java:197)
at view.TelaCadastro.access$300(TelaCadastro.java:16)
at view.TelaCadastro$4.actionPerformed(TelaCadastro.java:160)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6527)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6292)
at java.awt.Container.processEvent(Container.java:2234)
at java.awt.Component.dispatchEventImpl(Component.java:4883)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4705)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2739)
at java.awt.Component.dispatchEvent(Component.java:4705)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:719)
at java.awt.EventQueue$4.run(EventQueue.java:717)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Posta o código da classe Usuario.

package modelo;

/**
 *
 * @author aluno
 */
public class Usuario {
long id;
String nome, dtNascimento, eMail, cpf, sexo,senha;

public Usuario(long id, String nome, String dtNascimento, String eMail, String cpf, String sexo, String senha) {
    this.id = id;
    this.nome = nome;
    this.dtNascimento = dtNascimento;
    this.eMail = eMail;
    this.cpf = cpf;
    this.sexo = sexo;
    this.senha = senha;
}

public Usuario() {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

public Usuario(String text, String text0, String text1, String text2, String text3) {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}


public long getId() {
    return id;
}

public void setId(long id) {
    this.id = id;
}

public String getNome() {
    return nome;
}

public void setNome(String nome) {
    this.nome = nome;
}

public String getDtNascimento() {
    return dtNascimento;
}

public void setDtNascimento(String dtNascimento) {
    this.dtNascimento = dtNascimento;
}

public String geteMail() {
    return eMail;
}

public void seteMail(String eMail) {
    this.eMail = eMail;
}

public String getCpf() {
    return cpf;
}

public void setCpf(String cpf) {
    this.cpf = cpf;
}

public String getSexo() {
    return sexo;
}

public void setSexo(String sexo) {
    this.sexo = sexo;
}

public String getSenha() {
    return senha;
}

public void setSenha(String senha) {
    this.senha = senha;
}





}

Tá explicado. Você tá chamando o construtor vazio lá no método que é chamado quando clica no botão de cadastrar.

O construtor vazio tá definido ali:

public Usuario() {
    throw new UnsupportedOperationException("Not supported yet.");
}

Toda vez que você invocar esse construtor, vai acontecer uma exceção.

Porém se eu tirar ele ocorre esse erro na JFrame TelaCadastro

Porque você apagou o construtor, e agora ele não encontra mais o construtor vazio. Coloca o construtor de volta e apaga o que tinha dentro, aquele throw new ....