-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
6
-
x86
-
windows_2000
J2SE Version (please include all output from java -version flag):
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b38)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b38, mixed mode, sharing)
Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one)
Yes and No - it was changed in some version of 1.4 but always had
some problems
Operating System Configuration Information (be specific):
Microsoft Windows 2000 [Version 5.00.2195]
Bug Description:
Editable JComboBox remove should not clear editor
Currently the Editable JComboBox is inconsistent.
When the editor has a value that is not in the list removeItem will
leave the item unchanged (as it should).
However removeAllItems will clear the editor. Both removeItem and
removeAllItems should leave the editor item unchanged.
This bug seems to have been inserted (on purpose) because of bug report:
4425351. It appears that there is a lot of confusion in that bug report
and others what the correct behaviour should be. With non editable
combo boxes obviously remove should be clearing the editor item however
here we are talking about editable combo boxes. Some of the evaluators
commented that they are not sure if it should be clearing the editor or not.
The idea of the editable combo box is that the editor can hold values
that are not in the list, which can be used to add / modify existing values.
The problem gets worse when using formatters as the editor as
removeAllItems now attempts to set the editor to null which is illegal
for many formatters.
Steps to Reproduce (be specific):
- type something into the editor that does not exist in the list
press Remove All Items (the editor is cleared, but it shouldn't be [this
is a problem])
- type something else into the editor that does not exist in the list
press Remove Item (the editor is not cleared, even though the list might
be empty [this is fine])
- type something else into the editor that does not exist in the list
press Add Item
press Remove Item (the editor is cleared, but it shouldn't be [this is
also a problem])
###@###.### 2005-07-21 16:09:39 GMT
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b38)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b38, mixed mode, sharing)
Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one)
Yes and No - it was changed in some version of 1.4 but always had
some problems
Operating System Configuration Information (be specific):
Microsoft Windows 2000 [Version 5.00.2195]
Bug Description:
Editable JComboBox remove should not clear editor
Currently the Editable JComboBox is inconsistent.
When the editor has a value that is not in the list removeItem will
leave the item unchanged (as it should).
However removeAllItems will clear the editor. Both removeItem and
removeAllItems should leave the editor item unchanged.
This bug seems to have been inserted (on purpose) because of bug report:
4425351. It appears that there is a lot of confusion in that bug report
and others what the correct behaviour should be. With non editable
combo boxes obviously remove should be clearing the editor item however
here we are talking about editable combo boxes. Some of the evaluators
commented that they are not sure if it should be clearing the editor or not.
The idea of the editable combo box is that the editor can hold values
that are not in the list, which can be used to add / modify existing values.
The problem gets worse when using formatters as the editor as
removeAllItems now attempts to set the editor to null which is illegal
for many formatters.
Steps to Reproduce (be specific):
- type something into the editor that does not exist in the list
press Remove All Items (the editor is cleared, but it shouldn't be [this
is a problem])
- type something else into the editor that does not exist in the list
press Remove Item (the editor is not cleared, even though the list might
be empty [this is fine])
- type something else into the editor that does not exist in the list
press Add Item
press Remove Item (the editor is cleared, but it shouldn't be [this is
also a problem])
###@###.### 2005-07-21 16:09:39 GMT
- relates to
-
JDK-4425351 JComboBox.removeAllItems() doesn't clear editor when empty
-
- Resolved
-