private void ShowQuestion(int i) {
        
        Question cq = quiz.questionList.get(i);
        QuestionPanel.removeAll();
        AnswerButtons.clearSelection();
        if (quiz.randomiseQuestions)
        {
            Collections.shuffle(cq.answers);
        }
        JLabel qtextLbl = new JLabel(cq.questionText);
        qtextLbl.setSize(qtextLbl.getPreferredSize());
        int ypos = 20;
        qtextLbl.setLocation(0, ypos);
        QuestionPanel.add(qtextLbl);
        int ind = 0;
        int selected = 0;
        if (selectedAnswers.containsKey(cq.dbId))
        {
            selected = selectedAnswers.get(cq.dbId);
        }
        
        for (Answer a : cq.answers)
        {
            ypos += 20;
            JRadioButton jrb = new JRadioButton(a.answerText);
            jrb.setSize(jrb.getPreferredSize());
            jrb.setLocation(0, ypos);
            jrb.getModel().setActionCommand(Integer.toString(a.dbId)); //this is how we can tell which answer was picked
           
            AnswerButtons.add(jrb);
            QuestionPanel.add(jrb);
             if(selected == a.dbId)
            {
                jrb.setSelected(true);
            }
            ind++;
        }
        QuestionPanel.setVisible(true);
        QuestionPanel.repaint();
        //setVisible(true);
        qnumLbl.setText("Question " + Integer.toString(i + 1) + " of " + quiz.questionList.size());
        if(!quiztimer.isRunning())
        {
            startTimer();
        }
        if(i==0)
        {
            prevQbtn.setEnabled(false);
        }
        else
        {
            prevQbtn.setEnabled(true);
        }
        
        
    }