getSelectedIndex();
The getSelectedIndex() method returns an int, which is the numerical index of the currently selected RadioButton. If none is selected, its value is -1.
deselectAll();
The deselectAll() method deselects the currently selected radio button so no buttons are selected.
addActionListener(Object listener);
adds an action listener Object which receives GUIEvents when a radio button is clicked. You must implement the actionPerformed() method in order to receive events from the radio controller.
listener, the object that events are sent to (usually 'this').
From above I think you need actionPerformed() method with a getSelectedIndex() call to determine the button selection.
See the button example for an example for the actionPerformed() method.