You're trying to execute statements here, but without them being in a method or constructor:
ButtonGroup groupOfRadioButtons = new ButtonGroup();
groupOfRadioButtons.add(oneButton);
groupOfRadioButtons.add(twoButton);
groupOfRadioButtons.add(threeButton);
A class only directly contains method, constructor and nested type declarations, and initializer blocks.
You should put the three statements after the declaration into the constructor - you could use an initializer block, but it's not generally good in terms of readability.
public class ButtonSel extends JFrame {
... other fields ...
// Note: it's a good idea to make all fields private
private ButtonGroup groupOfRadioButtons = new ButtonGroup();
public ButtonSel() {
super("ButtonTest");
...
groupOfRadioButtons.add(oneButton);
groupOfRadioButtons.add(twoButton);
groupOfRadioButtons.add(threeButton);
}
}