if (p) stateMask = stateMask | PRESSED; else stateMask = stateMask & (~PRESSED);   fireStateChanged();  if (!p && isArmed()) { fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, actionCommand)); }  }
    public void setPressed(boolean b)      {      if (! isEnabled())        return;            super.setPressed(b);            // setPressed(false) == mouse release on us,      // if we were armed, we flip the selected state.      if (!b && isArmed())        setSelected(! isSelected());    }