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

Summary: Change "private" to "protected" modifier for event listener methods
Product: guibuilder Reporter: lxphilli <lxphilli>
Component: CodeAssignee: issues@guibuilder <issues>
Status: NEW ---    
Severity: blocker CC: MackSix, olaf
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

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. :)