-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
1.2.0
-
x86
-
windows_95
Name: dbT83986 Date: 12/23/98
DefaultComboBoxModel: inconsistency between addElement/insertElementAt
(swing1.1beta/2)
we can add the first element to the list by two methods
1. addElement(object) - adds the element and then select it
2. insertElementAt(object, 0) - only adds the element without selecting
Fix:
in addElement delegate to insertElementAt with
void addElement(Object object) {
insertElementAt(object, objects.getSize());
}
Greetings
Jeanette
PS:
My personal opinion is that there should be no default selection at all.
"Nothing selected" is a totally natural state on initialisation,
explicitly changing it should be under the control of clients
(Review ID: 37497)
======================================================================
- duplicates
-
JDK-4180963 DefaultComboBoxModel enhancements
-
- Open
-