Java examples for Swing:Action
unbind Swing Action From Listener
//package com.java2s; import java.beans.PropertyChangeListener; import javax.swing.Action; public class Main { public static void unbindActionTFromListener(Action action, Object object) {//from w ww. ja v a 2 s . c o m Object listener = action.getValue("listener"); if (listener instanceof PropertyChangeListener) { action.removePropertyChangeListener((PropertyChangeListener) listener); action.putValue("listener", null); } } }