sbool isJTextComponentUndoEnabled(JTextComponent c) { ret c != null && c.getActionMap().get("Undo") != null; }