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 88254 - Change "private" to "protected" modifier for event listener methods
Summary: Change "private" to "protected" modifier for event listener methods
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 2 votes (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-30 16:50 UTC by lxphilli
Modified: 2011-10-26 05:57 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lxphilli 2006-10-30 16:50:57 UTC
When using the form builder to generate an event listener method, the only option is the creation of 
private listener methods:

 private void handleWindowClosing(java.awt.event.WindowEvent evt) {
 // TODO add your handling code here:
 }


At least generate the method signature using "protected" modifier to allow for inheritance/override:
 
protected void handleWindowClosing(java.awt.event.WindowEvent evt) {
 // TODO add your handling code here:
 }
Comment 1 jgawera 2008-05-13 13:24:20 UTC
Gets my vote.
Maybe it should use the existing property for "Variable Modifier" Or have a separate setting.
Comment 2 olaf 2008-05-14 15:44:25 UTC
A separate setting would be better. BTW. Couldn't it be separate for every method? It would be more flexible.
Why is it not DEFECT? It forces to do event handling by hand.
Gets my vote too.
Comment 3 MackSix 2011-10-26 05:45:39 UTC
I think it should be a setting. :)