@Override
    /*
   handles the answers inserted into the answertextfield on the answerpanel
    */
    public void propertyChange(PropertyChangeEvent evt) {
        if (evt.getPropertyName().startsWith(AntwortTextField.VALUE_CHANGED)) {
            correctAnswers = 0;
            if (fragebogen != null) {
                int[] solutions = fragebogen.getSolutions();
                int[] answers = antwortPanel.getValues();
                String propName = evt.getPropertyName();
                int index = Integer.valueOf(propName.substring(AntwortTextField.VALUE_CHANGED.length(), propName.length()));
                AntwortTextField atf = antwortPanel.getAntwortTextField(index);
                for (int i = 0; i < solutions.length; i++) {
                    if (answers[i] == solutions[i]) {
                        correctAnswers++;
                        if (index == i) {
                            atf.setOldColor(Color.green);
                            atf.setBackground(Color.green);
                        }
                    } else {
                        if (index == i) {
                            atf.setOldColor(Color.red);
                            atf.setBackground(Color.red);
                        }
                    }
                }
                int iNumAnswers = antwortPanel.getNumAnswers();
                int iPercentage = 100 / iNumAnswers;
                dataset.setValue(CORRECT, correctAnswers * iPercentage);
                dataset.setValue(WRONG, (iNumAnswers - correctAnswers) * iPercentage);
                chart.setTitle(correctAnswers * iPercentage + "%");
                // if is in create mode then ' ' is not allowed
                if (antwortPanel.isFullyFilled(fragebogen == null) && hasKandidat()) {
                    if (index == (solutions.length - 1)) {
                        saveButton.setEnabled(true);
                        saveButton.requestFocus();
                    }
                }
            }
        }
    }