How to add a DropShadow effect to a TooltipWindow (that references your component)?

I have defined a single instance of TooltipWindow class inside my mainComponent thusly:

TooltipWindow tooltipWindow { this };

… passing ‘this’ so that it gets scaled properly with my MainComponent. So far so good.

I’d like to try having it render a drop shadow, but I’m not sure how to go about this. It doesn’t have one by default…

I tried setComponentEffect() but maybe I’m doing it wrong, it has no effect:

    tooltipWindow.setComponentEffect(new DropShadowEffect());

I was confused. I found it: it’s the DropShadower class. Sorry for the dumb question.

In the MainComponent class:

    TooltipWindow tooltipWindow { this };
    DropShadower ttDropShadower { DropShadow(Colours::black.withAlpha(0.5f), 6, {2,2} ) };

In the constructor: