public class

PointerInfo

extends Object
java.lang.Object
   ↳ java.awt.PointerInfo

Class Overview

A class that describes the pointer position. It provides the GraphicsDevice where the pointer is and the Point that represents the coordinates of the pointer.

Instances of this class should be obtained via getPointerInfo(). The PointerInfo instance is not updated dynamically as the mouse moves. To get the updated location, you must call getPointerInfo() again.

See Also

Summary

Public Methods
GraphicsDevice getDevice()
Returns the GraphicsDevice where the mouse pointer was at the moment this PointerInfo was created.
Point getLocation()
Returns the Point that represents the coordinates of the pointer on the screen.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public GraphicsDevice getDevice ()

Returns the GraphicsDevice where the mouse pointer was at the moment this PointerInfo was created.

Returns
  • GraphicsDevice corresponding to the pointer

public Point getLocation ()

Returns the Point that represents the coordinates of the pointer on the screen. See getPointerInfo() for more information about coordinate calculation for multiscreen systems.

Returns
  • coordinates of mouse pointer