Question: How to handle mnemonics?

Answer: There are two methods for mnemonics in NetBeans.

  1. The '&' method (single bundle entry with ampersand-prefixed mnemonic) is the preferred and recommended way of setting mnemonics.
  2. The other approach (2 key/value pairs) is considered obsolete and should be avoided.

Key/value pairs: You will see some lines in a bundle with a key/value for the mnemonic letter and a key/value for the associated label. & Method: Use an '&' in front of the letter of the assigned mnemonic in the value of the key for the label. If you will not need to change the assigned mnemonic keys. For the 2 key/values you still might need to add to the message itself what the value of the mnemonic key is. If you are actually changing the mnemonic key assignments, it is more complex and it will help to map out each such window so that there aren't conflicts where there is one key assigned to 2 different mnemonics.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo