adspace


How listener identify that the event came from a particular
object?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is parsing in java?

1038


How to create a base64 decoder in java8?

1135


What is an object in java and how is it created?

1136


What is the difference between equals() and == in java?

1035


What is a constructor overloading in java?

1123


What is a classloader in java?

1086


Realized?

2259


Write a program to print count of empty strings in java 8?

1084


What is the difference between break and continue statements?

1123


Explain public static void main(string args[]) in java.

1071


What do you mean by an interface in java?

1100


What is java string pool?

1079


Differentiate between static and non-static methods in java.

1123


How to sort array in descending order in java?

991


Write a program to find the whether a number is an Armstrong number or not?

1095