What are Generate Mnemonics Code options for and how do they work?

When a Generate Mnemonics Code option is checked, you can define mnemonics of labels and buttons by using the '&' character inside the text property instead of setting the text and mnemonics properties separately. This allows precise mnemonics definition and easy internationalization. However, this feature requires special NetBeans class (org.openide.awt.Mnemonics), so do not turn this option on unless you develop forms to be run within NetBeans IDE (as a plug-in module).

There are three levels of "Mnemonics" properties.
A. Tools->Options->Advanced Options->GUI Builder->Generate Mnemonics Code
B. Generate Mnemonics Code property of a form root node (the root node of Inspector)
C. Generate Mnemonics Code property in Code properties of a component

The last one specifies whether the Mnemonics support should be used for a particular component. If it is not set then the value is taken/inherited from B. The initial value of B (e.g. the value that is set when the form is created) is taken from A. The purpose of A is just to provide a default value for B for newly created forms. If you want to change this option for an existing form, you have to do it on the B or C level.

  Applies to: NetBeans 4.1, 5.0, 5.5, 6.x
  Platforms: All
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