Radio buttons
JRadioButton s1=new JRadioButton("Default distance table"); s1.setSelected(true);
JRadioButton s2=new JRadioButton("User distance table");
ButtonGroup group=new ButtonGroup();
group.add(s1);
group.add(s2);
There is another NEXT button after the radio buttons. I want something to happen when s1 is selected and something else to happen if s2 is selected. Clicking the NEXT button will run the selected operation.
How do i code this?

