java - Allowing parent to process mouse event if event was not consumed by child -


i have frame:

alt text

here happens:

  1. when i'm on pinkish panel, scroll pane works fine.
  2. when put mouse on darker gray jtextarea scroll pane not event.

in general question how can make sure parent of component receives event if component didn't handle specific event, if component has listener , enabled?

perhaps specific example do.

you can see calculator, calculator drawn on scalable image panel, , can zoom in , out ctrl + wheel event, when don't press ctrl, scroll pane receive event , scroll view port. (i think sums it)

adam.

while not entirely "neat", answer in question might adapted want do.

instead of mouse_event_mask you'd use awtevent.mouse_wheel_event_mask, , pass event scrollpane when control key state appropriate.

(with luck post "real" mechanism forward event parent component).


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -