Open In App

Java AWT | MouseInfo and PointerInfo

MouseInfo and PointerInfo is a part of Java AWT. MouseInfo provides information about the location of the pointer and the number of buttons on the mouse. PointerInfo provides information returns the information about the location of the pointer and the graphics device.

Methods of MouseInfo



Method Explanation
getNumberOfButtons() Returns the number of buttons on the mouse.
getPointerInfo() Returns a PointerInfo object that represents the current location and graphics device of the pointer.

Methods of PointerInfo



Method Explanation
getDevice() Returns the graphics device on which mouse was present when the object was created .
getLocation() Returns a point object that gives the location of the mouse pointer.

References:


Article Tags :