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 201872

Summary: Automatically fix dependencies in NetBeans platform application JPanel forms
Product: guibuilder Reporter: mienamoo
Component: CodeAssignee: issues@guibuilder <issues>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 7.1   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

Description mienamoo 2011-09-09 08:55:53 UTC
When creating a new JPanel form in a new NetBeans module, the developer has to manually add a module dependency and resolve imports when adding a JLabel. The text of the label will be stored in a bundle file, and accessing it requires a module dependency on the Utilities API module.

Steps to reproduce:

1. Create a new NetBeans platform application.
2. Create a new module as a part of the application from step 1.
3. Add a new JPanel form.
4. Drag and drop a label from the palette onto the form.
5. Save the form.
6. Try to build the module. You will see the following error because of unresolved dependencies:

error: package org.openide.util does not exist
jLabel1.setText(org.openide.util.NbBundle.getBundle("test/Bundle").getString("NewJPanel.jLabel1.text")); // NOI18N

Would it be possible to add the dependency on Utilities API automatically at some point during the creation process? I saw this for the very first time today since usually I would create a TopComponent first, and that wizard would add all the required dependencies. :)
Comment 1 mienamoo 2011-09-09 08:57:48 UTC
Mmm. Ignore the "resolve imports" part... After adding the dependency of course no other action is required. :)
Comment 2 Jan Stola 2011-09-12 09:30:02 UTC

*** This bug has been marked as a duplicate of bug 196497 ***