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 - Changing model of JComboBox or JList generates wrong code
Summary: Changing model of JComboBox or JList generates wrong code
Status: CLOSED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P4 blocker (vote)
Assignee: Josef Kozak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-07-17 21:23 UTC by Josef Kozak
Modified: 2003-06-30 18:30 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 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.