How to make a switch statement with JRadio Buttons in Java

Beginner at Java here, kinda of confused here, so I know how to make switch statements and I know how to use JRadio buttons. Just having trouble putting it all together to do a switch statement using radio buttons. I do have the JRadio buttons that I want to use in a JRadio button group called payFrequency.

Update: example of code I am trying to use, so I know this below is incorrect, I would advise to provide and example of what I was trying to do.( payFrequency is the button group that the other radio button are in dont know if that information is relevant.)

JDK7+ supports switch with all primitives and String objects. So no you cannot use a radio button in a switch statement. But you can use myRadioButton.getText() in your switch which will return the text label of the radio button. Then you can take appropriate actions for each case inside your switch.