JComponent (@NlsContexts.Label String shortcutRunAction) { JBLabel shortcutHint = new JBLabel(shortcutRunAction) { @Override public Color getForeground() { return getKeymapColor(); } }; shortcutHint.setBorder(JBUI.Borders.empty()); shortcutHint.setFont(UIUtil.getToolTipFont()); return shortcutHint; }