code: public void setActionListener(ActionListener listener) {
          for (int i = 0; i < this.radioButtons.length; i++) {
              this.radioButtons[i].addActionListener(listener);
          }
      }
docs: Sets the ActionListener for the radio buttons.
  @param listener ActionListener assigned to the radio buttons