Return the component under the given coordinates in the given parent
component. Events are often generated only for the outermost
container, so we have to determine if the pointer is actually within a
child. Basically the same as Component.getComponentAt, but recurses
to the lowest-level component instead of only one level. Point is in
component coordinates.
The default Component.getComponentAt can return invisible components
(JRootPane has an invisible JPanel (glass pane?) which will otherwise
swallow everything).
NOTE: getComponentAt grabs the TreeLock, so this should *only* be
invoked on the event dispatch thread, preferably with no other locks
held. Use it elsewhere at your own risk.
Return the last known Component to contain the pointer, or null if
none. Note that this may not correspond to the component that
actually shows up in AWTEvents.
getMouseLocation
public synchronized Point getMouseLocation()(Code)
Returns the mouse location relative to the component that currently
contains the pointer, or null if outside all components.
getMouseLocationOnScreen
public synchronized Point getMouseLocationOnScreen()(Code)
Returns the last known mouse location.
getUltimateMouseComponent
public synchronized Component getUltimateMouseComponent()(Code)
Return the most deeply nested component which currently contains the
pointer.