JeabSMJ
asked on
How to remove all ListSelectionListener?
How can I remove all the listener registered for a specific component.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
it's better to read the question before posting Answer. it's EVEN BETTER to post a COMMENT.
'remove all the listener'
'remove all the listener'
ASKER
I've found the method removeListSelectionListene r. The problem is that at the moment I don't know how many listener registered. I can not provide the parameter listener to remove.
so why don't you use my method ?
Hi JeabSMJ ,
the above method can remove a listselection listner for a list
box using the object of that that class.
do want to remove the listselection listener for a list box?
try out...
To hey hey.........
r u the founder of experts-exchange web site. u cant dictate terms..
the above method can remove a listselection listner for a list
box using the object of that that class.
do want to remove the listselection listener for a list box?
try out...
To hey hey.........
r u the founder of experts-exchange web site. u cant dictate terms..
JeabSMJ wants to remove all the listeners and he does not know the listeners objects. the question is quite clear, and your answer is quite WRONG.
the situation is simple - you can't use
public void removeListSelectionListene r(ListSele ctionListe ner listener)
if you don't have the 'listener' object.
and btw. I don't DICTATE anything. I HELP people.
all the best :)
the situation is simple - you can't use
public void removeListSelectionListene
if you don't have the 'listener' object.
and btw. I don't DICTATE anything. I HELP people.
all the best :)
Use this
It is defined in JList class
public void removeListSelectionListene
Remove a listener from the list that's notified each time a change to the selection occurs.
try out...