CardLayout.addLayoutComponent
Class Overview | Class Members |
This Package |
All Packages
public void addLayoutComponent( Component comp,
Object constraints )
Parameters
- comp
- the component to be added.
- constraints
- a tag that identifies a particular
card in the layout.
Description
Adds the specified component to this card layout's internal
table of names. The object specified by constraints
must be a string. The card layout stores this string as a key-value
pair that can be used for random access to a particular card.
By calling the show method, an application can
display the component with the specified name.
Exceptions
IllegalArgumentException
if the constraint is not a string.
See Also
show
public void addLayoutComponent( String name,
Component comp )
Description
Note: addLayoutComponent() is deprecated.
replaced by
addLayoutComponent(Component, Object).