private void btnConsultarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConsultarActionPerformed
        try{
            int numero = Integer.parseInt(txt1.getText());
            if(numero>0){
                Consultar consultar = new Consultar();
                int n = consultar.Consulta(numero);
                if(n==1){
                    consultar.setVisible(rootPaneCheckingEnabled);
                }
            }else{
                JOptionPane.showMessageDialog(null, "El numero debe ser mayor que cero");
            }
            }catch(NumberFormatException e){
                JOptionPane.showMessageDialog(null, "Debe escribir un numero");
            }
    }//GEN-LAST:event_btnConsultarActionPerformed