S
S
Sergey2015-07-09 00:56:50
Java
Sergey, 2015-07-09 00:56:50

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

1 answer(s)
S
Sergey Ozeransky, 2015-07-09
@KREGI

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 question

Ask a Question

731 491 924 answers to any question