Hi,
I want to change the color of a selected jradiobutton in a button group to RED when clicked on it. I am not able to do it make it happen till now. The problem is actually that when I select any jradiobutton the selection spot should stay and get blocked at that particular radiobutton. Its not happening so I thought lemme try with color change atleast .Here is my ActionListener code:-
public void actionPerformed(ActionEvent e) {
if(e.getActionCommand().equals("myJRadioButton")){
JRadioButton source = (JRadioButton)e.getSource();
source.setFocusPainted(true);
source.setEnabled(false);
//ButtonModel model = source.getModel();
//Group.setSelected(model, true);
}
}
So how do I set the focus only to the selected button and freeze it there or change the color of the selected button to show that it was selected by user ?
Thanks in advance