private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddActionPerformed

        if ("".equals(fldDescripcion.getText()) || ("".equals(fldCantidad.getText()))
                || ("".equals(fldCosto.getText())) || "".equals(fldNombre.getText()) 
                || "".equals(fldPrecio.getText())) {
            JOptionPane.showMessageDialog(this, "Complete todos los campos", "Error", JOptionPane.WARNING_MESSAGE);
        } else {
            it.setName(fldNombre.getText());
            it.setCantidad(fldCantidad.getText());
            it.setPrecio(fldPrecio.getText());
            it.setCosto(fldCosto.getText());
            it.setDescripcion(fldDescripcion.getText());

            try {
                dao.save(it);
            } catch (IOException ex) {
                Logger.getLogger(AddFrame.class.getName()).log(Level.SEVERE, null, ex);
            }
            JOptionPane.showMessageDialog(this, "Producto Guardado", "Atencion", JOptionPane.INFORMATION_MESSAGE);
            fldNombre.setText("");
            fldCantidad.setText("");
            fldPrecio.setText("");
            fldCosto.setText("");
            fldDescripcion.setText("");
        }

    }//GEN-LAST:event_btnAddActionPerformed