Answer the question
In order to leave comments, you need to log in
Removing event handlers in JAVA?
Previously, I wrote on AS (Flash) there with handlers tight, you have to follow it yourself. Now in JAVA I faced a similar problem.
Example:
There is a certain list of checkboxes, I subscribe to changing the state of each of them. The list itself forms a model from a file selected by the user.
Question:
Is it important to unsubscribe from each checkbox in case of updating the list, or is it enough just to delete the checkbox itself?
Simply, the list of fields is not small and the desire to optimize is constantly distracting. Thanks in advance!
Answer the question
In order to leave comments, you need to log in
no need to unsubscribe.
You create a handler, a class that implements the ActionListener interface, then you create a handler, the addActionListener method. You can remove a listener using the removeActionListener method.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question