actionPropertyChangeListener = createActionPropertyChangeListener(a);
  public void setAction(Action a)  {    if (action != null)      {        action.removePropertyChangeListener(actionPropertyChangeListener);        removeActionListener(action);        if (actionPropertyChangeListener != null)          {            action.removePropertyChangeListener(actionPropertyChangeListener);            actionPropertyChangeListener = null;          }        actionPropertyChangeListener = createActionPropertyChangeListener(a);  }    Action old = action;    action = a;    configurePropertiesFromAction(action);    if (action != null)      {        action.addPropertyChangeListener(actionPropertyChangeListener);        addActionListener(action);      }  }