Consider the following code snippet:
Which of the following statements should be in the indicated position to print out where the mouse was pressed?
A) x=event.printX() ;
y=event.printY() ;
B) x=(MouseEvent) getX() ;
y=(MouseEvent) getY() ;
C) x=event.getX() ;
y=event. getY() ;
D) x=event.getXposition( ) ;
y=event. getYposition ()
Correct Answer:
Verified
Q81: When you use a timer, you need
Q82: To process keyboard events, you need to
Q83: You wish to detect when the mouse
Q84: Suppose listener is an instance of a
Q85: What does the MouseAdapter class provide?
A)A class
Q87: Assume that the TimerListener class implements the
Q88: To process mouse events, you need to
Q89: Use the _ method to add a
Q90: The _ class in the javax.swing package
Q91: Consider the code snippet below:
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents