Creating Radio Buttons ButtonGroup group = new ButtonGroup(); JRadioButton b1 = new JRadioButton("Label1"); b1.addActionListener(actionListener); group.add(b1); JRadioButton b2 = new JRadioButton("Label2"); b2.addActionListener(actionListener); group.add(b2); // Set one of the radio buttons on. group.setSelected(b1.getModel(), true);