Duplicate :
|
A Component can listen for mouse changes via a MouseListener (or MouseMotionListener), but if the widget is reshaped there is no conveniant way to determine if the mouse is still inside the Component bounds, short of caching the location. As different components many need to track this state it would be nice if there were a method to determine the mouse location, perhaps on the Component level if we are worried about access to the mouse location.
|