I was thinking about the difference between happiness and joy, considered psychologically. The tricky thing with accounting for the difference is that any account of these two has to explain why happiness and joy seem related, but nonetheless why one can rejoice (ie. express joy) in the face of suffering (that is, experiencing sorrow, which is contrary to happiness).
It seems to me that happiness is experienced in actively achieving a perceived good (experienced as pleasure), or in passively not lacking a perceived good (experienced as contentment), or in an action insofar as it is directed towards one of these goods. We’d say, then, that the object of happiness is the perceived good.
The object of joy, on the other hand, is that which is perceived as an ultimate good (ie. the good which all other goods are directed towards and which itself is not directed towards any good beyond itself). People typically organize their entire lives around what they perceive as their ultimate good.
So happiness and joy definitely have something in common: joy is just happiness with respect to our ultimate good. But it is possible that, in suffering, we nonetheless contribute to our ultimate good, and therefore we can feel joy in the face of suffering.