Question:

Which of the following is NOT an event class in Java?

Show Hint

Common AWT event classes include `ActionEvent`, `ItemEvent`, `MouseEvent`, `KeyEvent`, `WindowEvent`, and `FocusEvent`. Each corresponds to a specific type of user interaction.
Updated On: Jul 2, 2026
  • FocusEvent
  • ItemEvent
  • LayoutEvent
  • ActionEvent
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

Java's Abstract Window Toolkit (AWT) uses an event-driven model to handle user interactions with GUI components. When a user interacts with a component (e.g., clicks a button), an event object is created. These objects are instances of various event classes.
Let's examine the options:
(A) FocusEvent: This event is generated when a component gains or loses keyboard focus. It is a standard event class in `java.awt.event`.
(B) ItemEvent: This event is generated when a user selects or deselects an item in a component like a `Checkbox` or a `Choice` menu. It is a standard event class in `java.awt.event`.
(D) ActionEvent: This is one of the most common events. It is generated by actions like clicking a `Button`, selecting a menu item, or pressing Enter in a `TextField`. It is a standard event class in `java.awt.event`.
(C) LayoutEvent: There is no standard event class named `LayoutEvent` in the `java.awt.event` package. Layout management is handled by `LayoutManager` interfaces and classes, which arrange components within a container, but they do not generate a `LayoutEvent`.
Therefore, `LayoutEvent` is not an event class in Java.
Was this answer helpful?
0
0