private void txtS2KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtS2KeyPressed
        if (evt.getKeyCode() == 10) {
            if (txtS1.getText().equals("")) {
                Integer to = Integer.valueOf(txtB1.getText()) + Integer.valueOf(txtS2.getText());
                if (to >= 28 && to <= 40) {
                    lblFS.setText(String.valueOf(to));
                    lblAcreditacion.setText("Aprobado");
                } else if (to < 28 && to > 0) {
                    lblFS.setText(String.valueOf(to));
                    lblAcreditacion.setText("Reprobado");
                } else {
                    txtS1.setText("");
                    lblFS.setText("");
                    lblAcreditacion.setText("");
                    lblMensaje.setText("Los valore ingresados estan fuera del rango deseado");
                }
            } else {
                Integer to = Integer.valueOf(txtS1.getText()) + Integer.valueOf(txtS2.getText());
                if (to >= 28 && to <= 40) {
                    lblFS.setText(String.valueOf(to));
                    lblAcreditacion.setText("Aprobado");
                } else if (to < 28 && to > 0) {
                    lblFS.setText(String.valueOf(to));
                    lblAcreditacion.setText("Reprobado");
                } else {
                    txtS1.setText("");
                    lblFS.setText("");
                    lblAcreditacion.setText("");
                    lblMensaje.setText("Los valore ingresados estan fuera del rango deseado");
                }
            }
        }
    }//GEN-LAST:event_txtS2KeyPressed