java - Allowing parent to process mouse event if event was not consumed by child -
i have frame:
here happens:
- when i'm on pinkish panel, scroll pane works fine.
- 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
Post a Comment