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 85309

Summary: Internationalize error in Form Class rename
Product: guibuilder Reporter: _ theanuradha <theanuradha>
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description _ theanuradha 2006-09-20 08:58:11 UTC
Internationalize error in  Form Class rename,

 ones you create a form class (UI CLASS) like JPanel or JFrame
 Internationalize happens as Default. But when you rename it 
 auto generated code dos not rename resource Bundle key class 
 ex:
 Before rename : "BeforRename.class"
  jTextFeild1.setText(org.openide.util.NbBundle.getMessage(
    BeforRename.class,"BeforRename.jTextFeild1.text"));//NOI18N 

 After rename : "AfterRenamed.class"
  jTextFeild1.setText(org.openide.util.NbBundle.getMessage(
    BeforRename.class,"BeforRename.jTextFeild1.text"));//NOI18N 
    
 now the class name is  "AfterRenamed.class"
  but NbBundle key is "BeforRename.class"
  so it's generated code is wrong and Runtime error 

 so my suggest is put getClass() to name like
  
 jTextFeild1.setText(org.openide.util.NbBundle.getMessage(
    getClass(),getClass()+".jTextFeild1.text"));//NOI18N 

====TheA (Anuradha from Sri Lanka)
Comment 1 Jan Stola 2006-09-20 09:12:55 UTC

*** This issue has been marked as a duplicate of 78450 ***
Comment 2 _ theanuradha 2006-09-20 10:29:01 UTC
Bug is still there in Netbeans 6.0 M3 
 
Comment 3 Jan Stola 2006-09-20 15:48:25 UTC
> Bug is still there in Netbeans 6.0 M3

Please, don't reopen this issue again. I closed it not because it is not 
present, but because it was already filled. Note that the issue has been marked 
as duplicate of issue 78450. The issue 78450 is marked as duplicate of issue 
48288 that is opened. So, the issue 48288 ensures that this issue will not be 
forgotten.

Note that it would be possible to mark this issue as a duplicate of issue 48288 
directly, but I decided to mark it as a duplicate of issue 78450 because it 
contains almost identical description and also contains evaluation/explanation 
from tpavek.

*** This issue has been marked as a duplicate of 78450 ***