Setting an Internationalizated String With the Form Editor
If you have a GUI application, you can use the Form Editor to internationalize
the text strings in the GUI form.
 |
The Form Editor may not be available in your version of
the IDE. If it is available, you will see a workspace titled GUI Editing.
You can enable the Form Editor module by choosing Tools
Update Center.
|
To insert an internationalized string with the Form Editor:
- Open the desired file in the Form Editor by double-clicking its node in
the Explorer.
- In the Component Inspector, locate the GUI component's property that you
want to internationalize (for example, the text property of jLabel).
- Select the property and click the ellipsis (...) button to open the property
editor.
- Select Resource Bundle form the Select Mode combo box.
The property editor switches to resource bundle mode, showing the .properties
file into which the internationalized strings will be saved in the Bundle
Name field. The Replace Format field gives you a preview of the internationalized
string.
- To choose a different .properties file, click Browse. Alternatively,
you can click New to create a new properties file in which to save the internationalized
strings. The .properties suffix is added to the file name you specify.
- Click Format if you want to change the method used to generate the internationalized
string.
- Click Arguments if you want to add arguments to the method call. You can
add arguments to the method call only if you use the java.text.MessageFormat
or org.openide.util.NbBundle.getMessage formats.
- Type in values for the Key and Value properties and click OK.
Legal Notices