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

Container.add(...) doc. doesn't say how to find doc. of constraint parameter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 1.4.0
    • 1.2.0
    • docs
    • beta2
    • generic
    • generic

      Name: rm29839 Date: 06/01/98

      The documentation of:

      java.awt.Container.add(Component, Object)

      does not say anything about where to
      refer to find a specification of valid
      values to pass in for the constraints parameter.

      (See http://java.sun.com/products/jdk/1.2/docs/api/java.awt.Container.html#add(java.awt.Component, java.lang.Object) ,
      as of 9/05/21.)

      It would be helpful if it said explicitly that
      valid values for the add method's constraint
      parmeters are defined by the attached layout
      manager.

      It definitely should say where to look to
      find a specification of valid values and their
      meanings.

      Regarding where that place to look would be:

      I would have thought that one or more of the
      methods of interface LayoutManager would take
      a constraints parameter, so the add documentation
      would say something like "see the xxx methods (from
      interface LayoutManager) of whichever class of
      layout manager you're using in the container."

      However, there is no such parameter, so I don't
      actually know how the constraint gets to the
      layout manager, or where Container.add's documenta-
      tion should direct the reader.

      (It sounds like Container.add also needs more
      documentation itself, to specify _how_ it "notifies
      the layout manager to add the component to this
      container's layout using the specified constraints
      object.")
      (Review ID: 30920)
      ======================================================================

            sharonz Sharon Zakhour (Inactive)
            rmandelsunw Ronan Mandel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: