A ButtonGroup is a list of Buttons that are informed when another button was pressed. A ButtonGroup has only one active button per time. The ButtonGroup is assigning ActionListeners to the buttons to receive calls on clickactions.
adds a button to the list. If this button is pushed or released (because another button was pressed), the corresponding functions are being called. The signature of the functions is:
function react ([theclickedbutton], [previousbutton])
You can use this functions to react on changes in the Buttongroup. Note that
if the currently active button is pressed again, no event is generated here.If toggle is true, clicking the active element will deselect the group.
This function makes the given button automaticly pushable. button:setPushable(true)