I'm having this problem where I can't figure out how to update the name of my JRadioButtons
I've set them up in the contsructor like so:
final JRadioButton ANSWER1 = new JRadioButton(answer1);
with answer1 being a String.
but whenever i change answer1, the name of the JRadioButton doesn't change.
I've set the JRadioButton to change name at the event of a JButton being clicked:
NEXT.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
qnumber++;
answer1 = "blah blah";
ANSWER1.setText(answer1);
but this doesn't seem to have any effect, any help would be greatly appreciated, thanks.