In this Java Swing GUI tutorial for Beginners we will learn how to use the Java Swing JMenu Class. The JMenu class allows you to create a popup window containing Menu Items that are displayed in a ManuBar.
JMenus support two kinds of keyboard alternatives: mnemonics and accelerators. Mnemonics offer a way to use the keyboard to navigate the menu hierarchy, increasing the accessibility of programs. Accelerators, on the other hand, offer keyboard shortcuts to bypass navigating the menu hierarchy. Mnemonics are for all users; accelerators are for power users.
A mnemonic is a key that makes an already visible menu item be chosen.
An accelerator is a key combination that causes a menu item to be chosen, whether or not it's visible.
A JMenu can also contain JRadioButtonMenuItems, JCheckBoxMenuItems, SubMenus and Separators.
Eclipse Project code is available on GitHub
https://github.com/JavaCodeJunkie
Check out my YouTube Channel for more FREE videos
/ javacodejunkie
Do you want to learn more about Java and how you can grow your skills as a Java Developer? SUBSCRIBE and ring that bell!