1.

Which of these methods can be used to obtain the coordinates of a mouse?(a) getPoint()(b) getCoordinates()(c) getMouseXY()(d) getMouseCordinates()I had been asked this question in exam.Asked question is from MouseEvent, TextEvent & WindowEvent Class topic in portion Event Handling of Java

Answer»

Correct choice is (a) getPoint()

The explanation is: getPoint() method can be used to obtain coordinates of a mouse, ALTERNATIVELY we can use GETX() and GETY() METHODS for x and y coordinates of mouse respectively.



Discussion

No Comment Found

Related InterviewSolutions