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 160116 - Cannot find symbol - Java Desktop Application generated incorrectly
Summary: Cannot find symbol - Java Desktop Application generated incorrectly
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-11 16:24 UTC by jsacha
Modified: 2009-07-15 17:09 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 jsacha 2009-03-11 16:24:01 UTC
I created a simple new project using Java Desktop Application template (swing application framework app). The *View
window was generated incorrectly. I am getting "cannot find symbol" error messages when compiling. The problem is that
'statusMessageLabel', 'statisAnimationLabel', and 'progressBar' are generated as 'local' variables in the
'initComponents()' method. 

I have my GUI Builder option set to "Generate Components as: Local Variables in initComponents() Method". Still, the
template code generation should realize that variables that the template is using outside initComponents() should be
generated as fields and once that are not used should be generated local.

A workaround is to use design view and then for each ('statusMessageLabel', 'statisAnimationLabel', and 'progressBar')
select 'Customomize Code' and select 'Variable' property as 'field' and check on 'private' flag.
Comment 1 Jan Stola 2009-05-22 17:15:01 UTC
Reproducible. You are right, we should add flags into the Java Desktop Application templates that force generation of 
class fields for components used outside initComponents() method.
Comment 2 Jan Stola 2009-07-15 17:09:27 UTC
Fixed.

Modified files: http://hg.netbeans.org/cdev/rev/5080bbba7977