private void btnGuardar1ActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnGuardar1ActionPerformed try { pre = new Prestamo(); pre.setCodigo_Prestamo(txtCodigoPrestamo.getText()); pre.setMonto(Double.parseDouble(txtMonto.getText())); pre.setDuracion(txtDuracion.getText()); pre.setTipoPrestamo(jCBTipoPrestamo.getSelectedItem().toString()); Conexion con = new Conexion(); cnx = con.obtener(); Prestamo_Servicios vs = new Prestamo_Servicios(); vs.guardar(cnx, pre); } catch (SQLException ex) { Logger.getLogger(Cliente_Insertar.class.getName()).log(Level.SEVERE, null, ex); JOptionPane.showMessageDialog(null, ",Se presento el siguiente error: " + ex); } catch (ClassNotFoundException ex) { Logger.getLogger(Cliente_Insertar.class.getName()).log(Level.SEVERE, null, ex); JOptionPane.showMessageDialog(null, ",Se presento el siguiente error: " + ex); } } // GEN-LAST:event_btnGuardar1ActionPerformed