Best way to listen to mouse wheel of a viewport?


Supposing I have a viewport V which views component A, and a different component B which is interested in mousewheel events of A.
What is the best method to achieve this? B.addMouseListener(X, true);

Help me find X :slight_smile:
For some reason the event doesn’t get triggered (not for V nor for A). Is this because the viewport’s scrollbar are overriding it?

Thank you.

No… you’ve got it the wrong way round, it’d be V.addMouseListener (B)

I claim temporary insanity.
Thank you.