How can I add to or change a label on a JMenuItem?
问题 I need to add a label on the right hand side of a JMenuItem , like the labels shown below: I have an application that uses Ctrl + + and Ctrl + - to zoom into an image. However, the + key by default (without Shift ) is the = key. When I try adding accelerators for these menu items, the Ctrl + - shortcut label displays as "Ctrl+Minus" (I would prefer "Ctrl -") and the Ctrl + + shortcut label displays as "Ctrl+Equals" (even worse - in the interest of user experience, I would prefer "Ctrl +"):