private void answerFieldKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_answerFieldKeyPressed
        if(evt.getKeyCode() == KeyEvent.VK_ENTER){
           endTime = System.currentTimeMillis();
           timeProblem(startTime,endTime);
           evaluteProblem();
           writeLog();
           if(problemCount < amount){
               displayCorrectness();
               startProblem();
           }
           else{
               displayCorrectness();  
               try {
                   TimeUnit.SECONDS.sleep(3);
               } catch (InterruptedException ex) {
                   Logger.getLogger(MultiplicationProblems.class.getName()).log(Level.SEVERE, null, ex);
               }
               this.dispose();
           }
        }
    }//GEN-LAST:event_answerFieldKeyPressed