if (model.isArmed()|| (menuItem instanceof JMenu && model.isSelected())) {
Icon disabledIcon = (Icon)menuItem.getDisabledIcon();
// Sometimes this is null. This will result in no
// shadow under the "raised up" icon, but oh well...
if (disabledIcon!=null)
disabledIcon.paintIcon(menuItem,g, iconRect.x,iconRect.y);
icon.paintIcon(menuItem,g, iconRect.x-2,iconRect.y-2);
}
else
icon.paintIcon(menuItem,g, iconRect.x,iconRect.y);
}