0

El error me lo manda es esta parte e investigue y dice algo de un valor null, la verdad no se que este mal:

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
   try {
     PreparedStatement pps = cn.prepareStatement("INSERT INTO cliente(Nombre, ApellidoP, ApellidoM, NombreUsuario, Contraseña, Estado, Colonia, Localidad) VALUES" );
     pps.setString(1, txtNOM.getText());
     pps.setString(2, txtAP.getText());
     pps.setString(3, txtAM.getText());
     pps.setString(4, txtUS.getText());
     pps.setString(5, txtPASS.getText());
     pps.setString(6, txtES.getText());
     pps.setString(7, txtCOL.getText());
     pps.setString(8, txtLOC.getText());

     pps.executeUpdate();

     JOptionPane.showMessageDialog(null, "Datos Guardados");
   } catch (SQLException ex) {
       Logger.getLogger(clientebd.class.getName()).log(Level.SEVERE, null, ex);
   }
}                                        

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

1 Answers1

0

Los Look and Feel en Java se configuran para modificar la apariencia de la aplicación. No todas las apariencias están disponibles en todas las plataformas, te aconsejo para configurar correctamente el Look and Feel en tu aplicación Java mirar los tutoriales de Oracle al respecto

Víctor
  • 826
  • 8
  • 15