Best way to listen to mouse wheel of a viewport?


#1

Hi.

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.


#2

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


#3

I claim temporary insanity.
Thank you.