code: public void setEditIcon(Icon editIcon, String text) {
          if (editIcon != null) {
              editButton.setIcon(editIcon);
              if (text != null) {
                  editButton.setToolTipText(text);
              }
              editButton.setText("");
          } else {
              editButton.setIcon(null);
              if (text != null) {
                  editButton.setText(text);
              }
          }
      }
docs: Set the icon to use on the edit button. If no icon is specified, then
  just the label will be used otherwise the text will be a tooltip.
  
  @param editIcon Icon to use on edit button