![]() ![]() The Correct Answer will always be Option A (I didn't get as far as being able to get the right answer).I worked for hours, but I in vain and desperately NEED help. I tried debugging it to see if my code is still running. When I add the third when in it doesn't even show the text for the problem. My code works fine with only two questions. JRadioButton OptionD = new JRadioButton(questions.D) īuttonGroup radioGroup = new ButtonGroup() įor(int i = 0 i answers = Arrays.asList(A, B,C,D) JRadioButton OptionC = new JRadioButton(questions.C) JRadioButton OptionB = new JRadioButton(questions.B) JRadioButton OptionA = new JRadioButton(questions.A) JLabel correctAnswerLabel = new JLabel ("Correct Answer! Good Job") ĬtBounds(300, 0, 1000, 500) ĬtFont(new Font(correctAnswerLabel.getFont().getName(), Font.BOLD, 46)) ĬtForeground(Color.GREEN) tFont(new Font(incorrectAnswerLabel.getFont().getName(), Font.BOLD, 46)) JLabel incorrectAnswerLabel = new JLabel ("Incorrect Answer! Try Again") ![]() tFont(new Font(Question.getFont().getName(), Font.PLAIN, 25)) JLabel Question = new JLabel(questions.Question) When this question is added the code breaks down Q3.Question = "3) When Is your Birthday?" import java.util.* įtDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |