Here you can find the source of unconfigureJCheckBoxMenuItem(JCheckBoxMenuItem mi, Action a)
public static void unconfigureJCheckBoxMenuItem(JCheckBoxMenuItem mi, Action a)
//package com.java2s; /*/*from ww w. j a va 2 s . co m*/ * @(#)ActionUtil.java * * Copyright (c) 1996-2010 by the original authors of JHotDraw and all its * contributors. All rights reserved. * * You may not use, copy or modify this file, except in compliance with the * license agreement you entered into with the copyright holders. For details * see accompanying license terms. */ import javax.swing.*; public class Main { /** * Unconfigures a JCheckBoxMenuItem for an Action. */ public static void unconfigureJCheckBoxMenuItem(JCheckBoxMenuItem mi, Action a) { /*PropertyChangeListener propertyHandler = (PropertyChangeListener) mi.getClientProperty("actionPropertyHandler"); if (propertyHandler != null) { a.removePropertyChangeListener(propertyHandler); mi.putClientProperty("actionPropertyHandler", null); }*/ mi.setAction(null); } }