Oi, esta ocorrendo alguns erros no código, e estou fazendo um teste apenas para 2 campos, o o CPF e Senha (para funcionando, depois faço os outros).
Se alguem puder ajudar… Obrigado
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
try{ //tratamento de erros
Class.forName("com.mysql.jdbc.Driver");//busca Driver
//conecta no BD
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/sgev","root","");
Statement stmt = con.createStatement(); //objeto comdo sql
String CadNome = jTextField1.getText(); //obtém nome digitado
int CadMat=Integer.parseInt( jTextField2.getText() );
stmt.executeUpdate( insert into TabFicha (Matricula, Nome) values (' " +
CadMat + " ',' " +
CadNome + " ' ) " );
JOptionPane.showMessageDialog( this, " Dados Salvos! ");
con.close(); // fecha conexão com BD
} catch( SQLException e){ //trata os erros
JOptionPane.showMessageDialog(this, "Erro Cmdo SQL " +
e.getMessage() );
// TODO add your handling code here:
}