code: public void addButton(Component button, boolean right) {
  
          if (right) {
              m_buttonPanelRight.addComponent(button);
          } else {
              m_buttonPanelLeft.addComponent(button);
              m_buttonPanelLeft.setVisible(true);
          }
      }
docs: Adds a button to the button bar.<p>
  
  @param button the button to add
  @param right to align the button right