Here you can find the source of checkActions(JComponent aComponent)
public static void checkActions(JComponent aComponent)
//package com.java2s; //License from project: Apache License import javax.swing.Action; import javax.swing.ActionMap; import javax.swing.JComponent; public class Main { public static void checkActions(JComponent aComponent) { ActionMap am = aComponent.getActionMap(); for (Object key : am.allKeys()) { Action action = am.get(key); if (action != null) { action.setEnabled(action.isEnabled()); }//from ww w . j av a2 s .c o m } } }