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 200381

Summary: Variable declaration code and generics in Code Customizer
Product: guibuilder Reporter: choces <choces>
Component: CodeAssignee: issues@guibuilder <issues>
Status: NEW ---    
Severity: normal CC: mclaborn
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:

Description choces 2011-07-26 08:58:13 UTC
Current variable declaration code inside Code Customizer, does not allow for editing, so new Java 7 Swing features, involving the use of generics for JList and JComboBox, cannot be properly set-up.

The following can be declared in the initialization code, as custom creation:
jComboBoxSelections = new javax.swing.JComboBox<>();

but inside the variable declaration code, we have:
private javax.swing.JComboBox jComboBoxSelections;
which is non editable.

This leads to some sort of inconsistent code, where the component gets initialized by its own generics definition, while its own variable does not.

I suggest to make possible the editing of such a variables section, same as the custom creation.
Comment 1 Jan Stola 2011-07-26 09:38:56 UTC
In fact, it is possible already to specify type parameters for a variable declared for a component/bean. It is just not possible to do it using Code Customizer.

Select the component/bean.
Switch to Code section in Properties window.
Modify 'Type Parameters' property.
Comment 2 Tomas Pavek 2013-06-18 17:41:32 UTC
*** Bug 230460 has been marked as a duplicate of this bug. ***