The ButtonBar#add() (same as ButtonBar#addButton()) method can be used to add a new button to the bar. As usual you can group multiple buttons by a ButtonGroup. The order of calling ButtonBar#add() controls the button position within the bar. The button with the highest height controls the ButtonBar height.
All relevant lines are highlighted. Press the "Run..." button to start the example.