Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4352327

JOptionPane should handle a java.util.List objects in messages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description



      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)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shickeysunw Shannon Hickey (Inactive)
              Reporter:
              skondamasunw Suresh Kondamareddy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: