private void checkAnswer(){
        if(tabIndex == 0){//Tab <code> TAB_MAIN </code> is chosen
            if(index == -1){
                index++;
                setQuestion();
            }

            String trueAnswer = words.get(index).getEWord().toLowerCase().trim();
            String thisAnswer = answer.getText().toLowerCase().trim();

            if (thisAnswer.equals(trueAnswer)&&(index<words.size())){
                index++;
                setQuestion();
            }
            progressBar.setValue(index);
        }else
            if(tabIndex == 1){//Tab <code>TAB_REPETITION</code> is chosen
                if(indRepet == -1){
                    indRepet++;
                    setQuestion();
                }

                String trueAnswer = repetitionWords.get(indRepet).getEWord().toLowerCase().trim();
                String thisAnswer = answer.getText().toLowerCase().trim();

                if (thisAnswer.equals(trueAnswer)&&(indRepet<repetitionWords.size())){
                    indRepet++;
                    setQuestion();
                }
                progressBar.setValue(indRepet);
            }
    }