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 13666

Summary: Changing model of JComboBox or JList generates wrong code
Product: guibuilder Reporter: Josef Kozak <jkozak>
Component: CodeAssignee: Josef Kozak <jkozak>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P4    
Version: 3.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:

Description Josef Kozak 2001-07-17 21:23:20 UTC
Steps to reproduce:
1. create JFrame with JComboBox or JList
2. set property model e.g. to: a, b, c
3. set property model back to: null
4. bad code is generated

-> there are 2 possible ideas (if user enters null):
A. null will be accepted as default value of property, so NO code should be 
generated
B. null will be accepted as the first string in StringArray of model, so code 
should be generated with one string value "null"

More useful is A. in my opinion, null string value of model is not frequent 
used. If this will be needed, user could enter this value through 
ComboBoxModelEditor ("..." button).
Comment 1 Josef Kozak 2001-07-17 21:24:51 UTC
::: absolutely reassigned
Comment 2 Josef Kozak 2001-07-17 21:28:12 UTC
::: absolutely started
Comment 3 Josef Kozak 2001-07-17 21:43:57 UTC
If there is NO value (default) for model, the code should not be 
generated.

::: fixed in dev only
Comment 4 Marian Mirilovic 2001-07-18 13:50:22 UTC
verified in [nb_dev](20010718)
Comment 5 Quality Engineering 2003-06-30 18:30:05 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.