BorderLayout.addLayoutComponent

BorderLayout.addLayoutComponent

Class Overview | Class Members | This Package | All Packages

Syntax 1
public void addLayoutComponent( Component comp, Object constraints )
Parameters
comp
the component to be added.
constraints
an object that specifies how and where the component is added to the layout.
Description
Adds the specified component to the layout, using the specified constraint object. For border layouts, the constraint must be one of the following strings: "North", "South", "East", "West", or "Center".

Most applications do not call this method directly. This method is called when a component is added to a container using the Container.add method with the same argument types.

Exceptions
IllegalArgumentException if the constraint object is not a string, or if it not one of the five specified strings.
See Also
add



Syntax 2
public void addLayoutComponent( String name, Component comp )
Description
Note: addLayoutComponent() is deprecated. replaced by addLayoutComponent(Component, Object).