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.
Parameters:
-
comp - the component to be added.
-
constraints - a tag that identifies a particular
card in the layout.
Throws:
-
IllegalArgumentException - if the constraint is not a string.
See Also:
CardLayout.show(java.awt.Container, java.lang.String)
,