private void btnBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarActionPerformed
        String text = txtBuscar.getText().toString();
        LibrosCRUD pdao =  new LibrosCRUD(MyConnection.getConnection());
        ArrayList<Libros> rows = new ArrayList<>();
        Libros p;
        if(text.isEmpty()){
            rows = pdao.getAll();
        }else{
            String option = jComboBox1.getSelectedItem().toString();
            switch(option){
                case "Por Nombre":
                    p = new Libros("", text, "", "", 0);
                    rows = pdao.getByNombre(p);
                    break;
                    
                case "Por Autor":
                    p = new Libros("", "", "", text, 0);
                    rows = pdao.getByAutor(p);
                    break;
            }
        }
        volcarDatos(rows);
    }//GEN-LAST:event_btnBuscarActionPerformed