java - Delete all usages of an actionlistener -
is there way delete action listener off components have attached?
something like: action.removefromall();
i have attached action several different buttons , when button pushed should no longer possible activate action. in action performed of action want delete buttons. possible or have loop through buttons?
an easier work around create instance variable boolean shouldperformaction = true
on action listener. , when button pushed action, set false
. , in actionperformed()
method, check if shouldperformaction
false , return without doing action.
Comments
Post a Comment