Forums Register Login

Mouse problem : How to filter mouse actions

+Pie Number of slices to send: Send
I've got a main window that has a canvas3d in it and it rotates with the mouse. I've popped up a second window with a different canvas3d window. These windows have different views of the same universe. I hooked up the mouse to rotate the view of the main window and not to the popup window. This portion appears to be working ok. The problem is that when I do the mouse movements in the popup window it moves the items in the main window. How do I stop this? any help will be greatly appreciated.
+Pie Number of slices to send: Send
It sounds like you've got the main window listening to mouse motion events in the child window. Just don't do that.
With some example code (in the simplest form necessary to replicate your experience - no 3d graphics), someone might be able to point out a specific solution.
Good Luck.
+Pie Number of slices to send: Send
That's my exactly my question. How do you control which window the mouse listens to, or filter out the messages from the unwanted windows. Is this even possible in Java?
--- Got a solution ---
The MouseEvent contains the component that generated the message. I can filter on that.
[ May 17, 2002: Message edited by: zoe goddard ]
+Pie Number of slices to send: Send
You may wish to peruse Sun's Java Tutorial Lessons on Writing Event Listeners and Event Handling.
When evil is afoot and you don't have any arms you gotta be hip and do the legwork, but always kick some ... tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 710 times.
Similar Threads
opening popup window conditionally
Pop-up in struts
create new session in jsp
Closing windows in JavaScript
Popup focus
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 23:02:17.