-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
1.0, 1.1
-
None
-
x86, sparc
-
generic, windows_95, windows_nt
Name: mc57594 Date: 03/13/97
java.awt.List and java.AWT.Choice can only contain Strings.
In most cases the labels that appear in the list are associated
with other objects. For instance, a list may contain strings
such as "red" and "blue" but the strings are associated by the
application with Color objects.
It would be much cleaner if java.awt.List and java.AWT.Choice
would accept the actual non-String object. This would free the
application from having to maintain the string to object mapping.
All that would be required is that the objects that are added to
the list return their desired label via toString(). There could
be methods such as addObject and getObjectSelected to mirror
addItem and getItemSelected.
company - InfoServ Australia , email - ###@###.###
======================================================================
- duplicates
-
JDK-4038377 Make java.awt.list act like java.awt.vector
-
- Closed
-
-
JDK-1236455 Suggestion for client data for entries in List class
-
- Closed
-
-
JDK-4055097 Lists should hold object, not Strings
-
- Closed
-