Java Basic
- Which of these methods can be used to know which key is pressed?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The getModifiers() methods returns a value that indicates which modifiers keys (ALT, CTRL, META, SHIFT) were pressed when the event was generated.
- Which of these are integer constants defined in ActionEvent class?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Action event defines 4 integer constants ALT_MASK, CTRL_MASK, SHIFT_MASK and ACTION_PERFORMED
- What is an event in delegation event model used by Java programming language?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
An event is an object that describes a state change in a source.
- Which of these events is generated when a button is pressed?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Action event is generated when a button is pressed, a list item is double-clicked or a menu item is selected.
- Which of these events will be generated if we close an applet’s window?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
WindowEvent is generated when a window is activated, closed, deactivated, deiconfied, iconfied, opened or quit.