Java Basic
- Which of these methods can be used to change location of an event?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
TranslatePoint()
- Which of these methods can be used to obtain the coordinates of a mouse?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
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.
- Which of these events is generated when the window is closed?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
A WindowEvent is generated when a window is opened, close, activated or deactivated.
- Which of these is superclass of ContainerEvent class?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
ContainerEvent is superclass of ContainerEvent, FocusEvent, KeyEvent, MouseEvent and WindowEvent.
- Which of these methods can be used to know the type of focus change?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
There are two types of focus events – permanent and temporary. The isTemporary() method indicates if this focus change is temporary, it returns a Boolean value.