-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.3.0
-
generic
-
generic
Name: skT45625 Date: 07/11/2000
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
Currently JOptionPane handles objects of Array type that are passed in as the
message parameter to any of the showXXXDialog methods. It should handle an
instance of java.util.List in the same way. Not only does this make sense in
terms of cohesiveness with the Collections API, but it also makes complex
messages easier to code.
For example, currently you have to construct a complex message as follows:
Object[] msg = new Object[3];
msg[0] = "first line";
msg[1] = new JTextArea("some text here");
msg[2] = image;
Adding/inserting a new item to the msg array involves updating all the array
indexes and changing the array length. Messages that are dynamically built must
furst be built up with a List which is then converted to an Array before being
passed to JOptionPane. It would be nice to directly pass in the List.
(Review ID: 107092)
======================================================================
- duplicates
-
JDK-4304287 Swing components should require the use of Collections and not Vectors
-
- Open
-