Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a mnemonic in java? [closed]

Tags:

java

mnemonics

I can find a bunch of info talking about mnemonics but nothing about what they are. Can someone help me here?

like image 250
Jon Aird Avatar asked Nov 28 '12 21:11

Jon Aird


People also ask

How many mnemonics can you set for a JMenuItem?

There are two ways to set the mnemonic for JMenuItem.

How do you set a mnemonic for a JButton?

The mnemonic key is often pressed in combination with a modifier key such as the Alt key. The modifier key is platform-dependent; however, it is usually the Alt key. For example, suppose you set the C key as a mnemonic for a Close JButton. When you press Alt+C, the Close JButton is clicked.


2 Answers

From swing documentation:

Mnemonics offer a way to use the keyboard to navigate the menu hierarchy, increasing the accessibility of programs.

It's the underlined letter in menus, buttons, labels, tabs etc. Pressing the ALT-key and the underlined letter on the keyboard selects that menu item.

like image 182
poplitea Avatar answered Oct 01 '22 05:10

poplitea


A mnemonic is a keyboard shortcut that allows you to access some menu item. It's an accessibility thing.

This tutorial is a good illustration.

like image 24
mprivat Avatar answered Oct 01 '22 06:10

mprivat