Component.getComponentAt
Class Overview | Class Members |
This Package |
All Packages
public Component getComponentAt( int x,
int y )
Parameters
- x
- the x coordinate.
- y
- the y coordinate.
Returns
the component or subcomponent that contains the
(x, y) location;
null if the location
is outside this component.
Description
Determines if this component or one of its immediate
subcomponents contains the (x, y) location,
and if so, returns the containing component. This method only
looks one level deep. If the point (x, y) is
inside a subcomponent that itself has subcomponents, it does not
go looking down the subcomponent tree.
The locate method of Component simply
returns the component itself if the (x, y)
coordinate location is inside its bounding box, and null
otherwise.
See Also
contains
public Component getComponentAt( Point p )
Parameters
- p
- the point.
Description
Returns the component or subcomponent that contains the
specified point.
See Also
contains