code: public void setModel (ComboBoxModel<?> model)
      {
          // if we had a previous model, unregister ourselves from it
          if (_model != null) {
              _model.removeListDataListener(this);
          }
  
          // subscribe to our new model
          _model = model;
          _model.addListDataListener(this);
  
          // rebuild the list
          removeAll();
          addButtons(0, _model.getSize());
      }
docs: Provides the button box with a data model which it will display. If
  the model contains {@link Image} objects, they will be used to make
  icons for the buttons. Otherwise the button text will contain the
  string representation of the elements in the model.