Convenience routing to make a Swing Action.
String text = b.getString(key + ".label");
putValue(NAME, text);
putValue(SMALL_ICON, icon);
// May be a Mnemonic under ".key".
try {
String mnemonic = b.getString(key + ".key");
putValue(MNEMONIC_KEY, new Integer(mnemonic.charAt(0)));
} catch (MissingResourceException ex) {
// Nothing to do.
}
// May be a ToolTip Description under ".descr".
try {
String ttDesc = b.getString(key + ".descr");
putValue(SHORT_DESCRIPTION, ttDesc);
} catch (MissingResourceException ex) {
putValue(SHORT_DESCRIPTION, text);
}