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

        nota1 = Double.parseDouble(txt1.getText());
        nota2 = Double.parseDouble(txt2.getText());
        nota3 = Double.parseDouble(txt3.getText());
        nota4 = Double.parseDouble(txt4.getText());
        
        media = (nota1 + nota2 + nota3 + nota4) / 4;
        
        if(media >= 5) {
            JOptionPane.showMessageDialog(null, "Aprovado!");
        } else if(media >= 3 && media <= 4.5) {
            JOptionPane.showMessageDialog(null, "Recuperacao!");
        } else if(media < 3) {
            JOptionPane.showMessageDialog(null, "Reprovado!");
        }
    }//GEN-LAST:event_jButton1ActionPerformed