This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 157762 - Gui Builder - JLabel - Text Property Editor Defect
Summary: Gui Builder - JLabel - Text Property Editor Defect
Status: RESOLVED INVALID
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: Other Linux
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-02 11:21 UTC by dudy
Modified: 2009-02-03 10:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dudy 2009-02-02 11:21:48 UTC
In the GUI builder I have a JLabel whose text (a String) I want to set to "date of birth" and use I18N to provide different 
languages per user. I use the properties editor of NetBeans, a windows comes up where I may edit the "Plain Text". I switch to 
"Resource Bundle", choose one and provide a key and a value. My key is "date of birth", my value is the german "Geburtsdatum". 
I have also adjusted the format of the generated code as I want to switch the resource bundle per user ("CurrentUser.getInstance
().getResourceBundle.getString({key})").

I close the dialog, everything looks good. If I reload the form, the internationalized string disappears and the JLabel show the 
keys in brackets ("<date of birth>").

If I reopen the string property editor for the "text" of the JLabel and escape the spaces in the key ("date\ of\ birth") the 
GUI looks fine, but ... the source code is no longer valid as it contains "illegal escape character" !

The problem only occured after applying patch 2, on two different systems with OpenSuse 11.1 and OpenSuse 10.3. JDK is 1.6.0_11 
64bit.
Comment 1 pribyl 2009-02-03 10:25:09 UTC
Hello.
The key should not actually be "date of birth", but the JLabel's 'text' - e.g. "jLabel1.text"
To add more language modifications, select the Bundle.properties node in Projects or Files view and select Add>Locale.
Then select for example en_GB - English.
Now you can add new *value* "Date of birth".
 
Please, see the I18N tutorial http://www.netbeans.org/kb/60/java/gui-automatic-i18n.html if there is still anything unclear.

Anyway, thanks for your report.