1. Create an instance of ButtonGroup.
2. Create instances of JRadioButton.
3. Add each JRadioButton instance to the ButtonGroup instance.
// Create the button group.
bg = new ButtonGroup();
// Create the radio buttons. Select the first one.
jrbFrench = new JRadioButton("French", true);
jrbGerman = new JRadioButton("German");
jrbChinese = new JRadioButton("Chinese");
// Add the radio buttons to the group.
bg.add(jrbFrench);
bg.add(jrbGerman);
bg.add(jrbChinese);