What is the purpose of the enableEvents() method?

What is the purpose of the enableEvents() method?

When you register a listener, enableEvents() is called. So you don’t have to do this separately. However, there could be situations where you need an object to handle its own events. This can also be achieved by using a listener though. An example of the usage of this method would be an event of closing the window where you want to prompt the user to save the data when he clicks on the ‘X’ icon.
Difference between a Scrollbar and a ScrollPane
Scrollbar and a ScrollPane - A Scrollbar is a Component. Scrollpane is a Container...
Difference in using runnable and extends in Thread.
JAVA Runnable and Extents - We can use Extend Thread class only when the class is not extending another class...
JAVA Thread safety - Explain the term thread safety and synchronization.
JAVA Thread safety - The term Thread safety means each method in a multithreaded environment...
Post your comment
Discussion Board
thanking
thankssssssssss!!!!!!!!!!!!!!!!!!!!!!
abc 02-13-2014