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

Swing components should require the use of Collections and not Vectors

    XMLWordPrintable

    Details

    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      generic, x86
    • OS:
      generic, linux, windows_95, windows_98, windows_2000, windows_xp

      Description

      Name: krT82822 Date: 01/12/2000


      java version "1.3beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3beta-O)
      Java(TM) HotSpot Client VM (build 1.3beta-O-release, 1.3beta-O-release, interpr)

      Let's say I have an ArrayList (or any other Collection) and I want to create a
      JBomboBox from it, I'd either have to turn it into a Vector or an array of
      Objects. Vectors have too much bloat because they maintain backwards
      compatibility (which is the reason I use ArrayList) so this inherently limits
      Swing components. The optimal solution is instead of using constructors such as

      JComboBox(Vector v)

      use

      JComboBox(Collection C)

      At least then developers have a choice.
      (Review ID: 99866)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              kryansunw Kevin Ryan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Imported:
                Indexed: