java.awt

Class PointerInfo

public class PointerInfo extends Object

PointerInfo represents information about the mouse pointer, i.e. its GraphicsDevice and location. PointerInfo objects cannot be instantiated directly, but are retrieved from MouseInfo.getPointerInfo(). PointerInfo objects are immutable and will not be updated for future mouse motions.

Since: 1.5

Method Summary
GraphicsDevicegetDevice()
Returns the GraphicsDevice on which the mouse pointer was located
PointgetLocation()
Returns the coordinates of the mouse pointer.

Method Detail

getDevice

public GraphicsDevice getDevice()
Returns the GraphicsDevice on which the mouse pointer was located

Returns: a GraphicsDevice object.

getLocation

public Point getLocation()
Returns the coordinates of the mouse pointer.

Returns: a Point object containing the pointer coordinates.