AWT LayoutManager2 Interface

  • Post author:
  • Post category:AWT
  • Post comments:0 Comments
 LayoutManger interface

Introduction

The interface LayoutManger is used to define the interface for classes that know how to lay out Containers based on a layout constraints object.

Class declaration

Following is the declaration for java.awt.LayoutManager2 interface:

public interface LayoutManger2
   extends LayoutManager

Interface methods

S.N.Method & Description
1void addLayoutComponent(Component comp, Object constraints)Adds the specified component to the layout, using the specified constraint object.
2float getLayoutAlignmentX(Container target)Returns the alignment along the x axis.
3float getLayoutAlignmentY(Container target)Returns the alignment along the y axis.
4void invalidateLayout(Container target)Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
5Dimension maximumLayoutSize(Container target)Calculates the maximum size dimensions for the specified container, given the components it contains.

Previous Page:-Click Here

Leave a Reply