posted 15 years ago
Hello coders,
I'm experimenting with mouseListeners and I have an interesting problem (I think). I've searched the forum for similar posts but found none. Sorry if I missed any.
In my program I'm trying to move parts of shapes by dragging one of its points. I've already implemented the mousePressed() and mouseDragged() methods, and I can move single points. But I need to find out how many pixels the mouse pointer moved in X and Y and in which direction, so that I can apply the same vector to the other points.
In the mouseWheelEvent there is a method called getWheelRotation(), which returns the direction of the wheel. I need something alike for X and Y, instead of the actual new position getX() and getY() are returning.
Any thoughts? Thanks a bunch in advance,
O.
--
Sex is an emotion in motion.
-- Mae West