java.awt

Class MouseInfo

public class MouseInfo extends Object

MouseInfo is a class containing utility functions for mouse information.

Since: 1.5

Method Summary
static intgetNumberOfButtons()
Returns the number of mouse buttons, or -1 if no mouse is connected. (mentioned in the 1.5 release notes)
static PointerInfogetPointerInfo()
Returns a PointerInfo object containing information about the current location of the mouse pointer

Method Detail

getNumberOfButtons

public static int getNumberOfButtons()
Returns the number of mouse buttons, or -1 if no mouse is connected. (mentioned in the 1.5 release notes)

Returns: an integer number of buttons.

Throws: HeadlessException if the current GraphicsEnvironment is headless.

getPointerInfo

public static PointerInfo getPointerInfo()
Returns a PointerInfo object containing information about the current location of the mouse pointer

Returns: a PointerInfo object.

Throws: HeadlessException if the current GraphicsEnvironment is headless.