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)
======================================================================
- duplicates
-
JDK-4144450 Container.add(...) doc. doesn't say how to find doc. of constraint parameter
-
- Resolved
-