JMenuItem
JMenuItem is a component in the Swing GUI toolkit that represents a selectable item within menus. It is used inside menus such as JMenu and JPopupMenu and serves as a leaf item that triggers an action when chosen. JMenuItem extends AbstractButton, implements Accessible, and relies on a UI delegate to render its appearance.
A JMenuItem can display text and an icon, and it supports keyboard shortcuts through a mnemonic or
Events are delivered to registered listeners when the item is selected by the user. The common pattern
JMenuItem has specialized subclasses for different menu behaviors, including JCheckBoxMenuItem for toggleable states and JRadioButtonMenuItem for