java.awt.LayoutManager2 (JDK 1.1)
This interface is an extension of the LayoutManager interface. It defines additional layout management methods for layout managers that perform constraint-based layout. GridBagLayout is an example of a constraint-based layout manager--each component added to the layout is associated with a GridBagConstraints object that specifies the "constraints" on how the component is to be laid out.
Java programs do not directly invoke the methods of this interface--they are used by the Container object for which the layout manager is registered.
public abstract interfaceLayoutManager2extends LayoutManager { //Public Instance Methodspublic abstract voidaddLayoutComponent(Componentcomp, Objectconstraints); public abstract floatgetLayoutAlignmentX(Containertarget); public abstract floatgetLayoutAlignmentY(Containertarget); public abstract voidinvalidateLayout(Containertarget); public abstract DimensionmaximumLayoutSize(Containertarget); }
Implemented By:
BorderLayout, CardLayout, GridBagLayout