我创建了一个JButtons匿名数组,ActionListeners在某些条件下我想删除所有ActionListeners,但该.removeActionListeners方法需要ActionListener一个参数.如何删除动作侦听器?
for (int i=0; i < button.length; i++){
button[i] = new JButton();
button[i].addActionListener(listener.new ButtonListener());
}
Run Code Online (Sandbox Code Playgroud)