jeudi 18 août 2016

Making JRadio button random

my data comes from query like this to my radio buttons:

radio1.setText(Question.get(i).getChoiceOne()) // assign ist choice to ist radio button
radio2.setText(Question.get(i).getChoiceTwo()) // assign second choice to second radio
radio3.setText(Question.get(i).getcorrectchoice()) // assign correct choice to third radio button

In this case each time the correct answer is assigned to third radio button which makes the quiz predictable.. Can I do it in some way where the correct choice some times assign to first radio, some times to second and so on?




Aucun commentaire:

Enregistrer un commentaire