arrowButton.setText(comboBox.getSelectedItem().toString());
String text = ""; Object selected = comboBox.getSelectedItem(); if (selected != null) text = selected.toString(); arrowButton.setText(text);
  protected void editablePropertyChanged(PropertyChangeEvent e)  {    if (arrowButton instanceof MetalComboBoxButton)      {        MetalComboBoxButton b = (MetalComboBoxButton) arrowButton;        b.setIconOnly(comboBox.isEditable());      }    if (comboBox.isEditable())      {        arrowButton.setText(null);        if (editor != null)          editor.setVisible(true);      }    else      {        arrowButton.setText(comboBox.getSelectedItem().toString());        if (editor != null)          editor.setVisible(true);      }  }