MouseListener callbacks don't get called on a component


I’ve got a component class class GainSlider : public Component, which in turn has

void mouseEnter(const MouseEvent& event) override;
void mouseExit(const MouseEvent& event) override;

in the public section of class definition. Then I have these method definitions… But they never get called. I noticed there’s those callbacks in the Juce’s Component class definition, but also it has a MouseListener parent class defined which has those also. Is it ok? Well anyways, There’s nothing else special about my class. Any ideas???

Did you add your component to a parent component and make it visible? Did you set the slider component’s bounds so that it has some size?