@SuppressWarnings("empty-statement")
    private void jBtnInsertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnInsertActionPerformed
        // TODO add your handling code here:
        try {
            String sql = "INSERT INTO direccion (calle, colonia, num_interior, num_exterior, estado, pais, ciudad, codigo_postal, clientes_idClientes) "
                    + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
            
            Connection conn = Conexion.GetConnection();
            conn.setAutoCommit(false);
            PreparedStatement ps = conn.prepareStatement(sql);
            
            if(((((("".equals(jTxtFldNumExt.getText()) || "".equals(jTxtFldCalle.getText())) || "".equals(jTxtFldCiudad.getText())) || "".equals(jTxtFldColonia.getText())) || "".equals(jTxtFldEstado.getText())) || "".equals(jTxtFldPais.getText())) ||
                    "".equals(jTxtFldCP.getText())){
                JOptionPane.showMessageDialog(this, "Por favor llene los campos obligatorios");
                jLblCamposObligatorios.setVisible(true);
            }else{
                ps.setString(1, jTxtFldCalle.getText());
                ps.setString(2, jTxtFldColonia.getText());
                
                if(!"".equals(jTxtFldNumInt.getText())){
                    ps.setString(3, jTxtFldNumInt.getText());
                }else{
                    ps.setString(3, "N/A");
                }
                
                ps.setString(4, jTxtFldNumExt.getText());
                ps.setString(5, jTxtFldEstado.getText());
                ps.setString(6, jTxtFldPais.getText());
                ps.setString(7, jTxtFldCiudad.getText());
                ps.setString(8, jTxtFldCP.getText());
                ps.setString(9, (String)this.jTblClientes.getValueAt(this.jTblClientes.getSelectedRow(), 0));
                
                ps.execute();
                conn.commit();
                
                
                cargarDirecciones();
                clearTextFields();
                disableCampos();
            }
            

        } catch (SQLException e) {
            JOptionPane.showMessageDialog(this, e.getErrorCode()+": "+e.getMessage());
        }
    }//GEN-LAST:event_jBtnInsertActionPerformed