I have three JRadioButtons added to a JPanel. However, when I select one, I can select another one and the previous one selected stays selected. How can I make sure that only one is selected at a time? My JPanel class, which is added by my main JFrame: Answer As you didn’t share the complete code i can’t tell how
Tag: jradiobutton
Java quiz with multi choices in answers
I’m trying to develop a java quiz, here’s the basic idea: A quiz contains n questions, and a question has 0 to n true answers, I have to link that to a database, so my tables are: Table Quiz: Table Question: Table answer: So my java classes are: My Question class: and the same for Answer: The main JFrame contains
Java Radio Button Variable Errors
So this works now, and i fixed the variable calling errors. but I get : My GUI Pops up but is blank, what is it now? I cannot figure out what the problem is at this time. This is very important to get resolved, thank you in advance. Answer the first error means when you call buildPanel(String, String) you need
How to add radio buttons in button group?
After dragging and dropping button group in Netbeans 7.2, how to add radio button in that button group? Answer There’s a Button Group field in the radio button’s property. Set this value for each of the radio button that you want to add in the group to the button group’s name.