private void ShowQuestion(Question cq, boolean isPractice) {
        
       
        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.setSize(800, 800);
        this.repaint();
        this.getParent().repaint();
        QuestionPanel.setVisible(true);
        QuestionPanel.repaint();
        
        //setVisible(true);
        if(!isPractice)
        {
        qnumLbl.setText("Question " + Integer.toString(qIndex + 1) + " of " + quiz.questionList.size());
        if(!quiztimer.isRunning())
        {
            startTimer();
        }
        if(qIndex ==0)
        {
            PrevBtn.setEnabled(false);
        }
        else
        {
            PrevBtn.setEnabled(true);
        }
        if(qIndex ==quiz.questionList.size() - 1)
        {
            NextBtn.setText("Submit");
            NextBtn.setActionCommand("Submit");
        }
        else
        {
            NextBtn.setText("Next");
            NextBtn.setActionCommand("Next");
        }
        }
        else
        {
            NextBtn.setVisible(true);
            
            PrevBtn.setVisible(true);
            PrevBtn.setEnabled(false);
            PrevBtn.setText("Previous");
            NextBtn.setText("Next");
            NextBtn.setActionCommand("Start");
        }
        
    }