How listener identify that the event came from a particular
object?
Answer / Nitish Mathur
In Java, an event is dispatched to all registered listeners. However, each listener can check if the source of the event (EventObject) corresponds to the specific object it's listening for by using the 'getSource()' method of the event object.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why doesn't the java library use a randomized version of quicksort?
Why are strings immutable in Java?
Which method is used to find that the object is exited or not?
Is singleton thread safe in java?
How hashmap increases its size in java?
What is Map interface?
What is an interface in java?
Why do we need main method to execute a java program?
Explain the difference between extends thread vs implements runnable in java?
What is Java Package and which package is imported by default?
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
What is a container in a gui?