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 64262 - Listener Generation Style: Only Anonymous Inner Class is working, One Inner Class and Main Class have no effect
Summary: Listener Generation Style: Only Anonymous Inner Class is working, One Inner C...
Status: RESOLVED INVALID
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-13 16:34 UTC by _ wadechandler
Modified: 2005-09-13 17:05 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 _ wadechandler 2005-09-13 16:34:32 UTC
Issue:
Tools->Options->Advanced->Form Editor->Listener Generation Style is not having
any effect.  Only the Anonymous Inner Classes are being generated.  This was
checked with different layouts including the natural layout.

Environment:
Using NB 5.0 build 200509051800, JDK 1.5.0, VM Hotspot client b64, Sun
Microsystems, Windows XP SP1 x86

Reproduction:
Create a new java application and name it list_gen_test.  Create a new JFrame
and call it ListGenTestJFrame.  Add two buttons to the form.  Go to
Tools->Options->Advanced->Form Editor->Listener Generation Style and change it
from Anonymous Inner Classes to One Inner Class or Main.  Right click on one of
the added buttons then Events->Action->actionPerformed.  Notice the code being
generated.
Comment 1 Jan Stola 2005-09-13 16:57:31 UTC
The property Tools->Options->Advanced->Form Editor->Listener Generation Style
is just a default value for a newly created forms. If you want to change
listener generation style for an existing form then you have to change
Listener Generation Style property of this form's root node (root node
of the Inspector window).
Comment 2 _ wadechandler 2005-09-13 16:59:36 UTC
Sorry,  I should have added to the reproduce stuff.....I meant to.

Also add a new form after changing the setting.....

it has no effect.
Comment 3 _ wadechandler 2005-09-13 17:02:36 UTC
Might have jumped the gun....I might have done that after I moved it back
messing around with it.  I just added yet another form and that one is working.
 I'll do some more checking.
Comment 4 _ wadechandler 2005-09-13 17:05:17 UTC
Yes.....apologies.  My eyes were playing tricks on me.  I checked the last form
I created and it had the correct event listener as well.  I had added another
form earlier and for what ever reason either I opened the first one by accident
or just looked at that one and thought it was wrong.....what ever the
reason....apologies.