adspace


Can a class be it?s own event handler? Explain how to implement this?

Answer Posted / Manish Yadav

Yes, a class can serve as its own event handler in Swing by implementing the required interface (e.g., ActionListener or MouseListener) and overriding the appropriate method(s). By doing so, the class becomes both the event source and listener, eliminating the need for separate listener classes.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

No New Questions to Answer in this Category !!    You can

Post New Questions

Answer Questions in Different Category