AWT LayoutManager Interface

  • Post author:
  • Post category:AWT
  • Post comments:1 Comment
LayoutManager

Introduction

The interface LayoutManager is used to define the interface for classes that know how to layout Containers.

Class declaration

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

public interface LayoutManager

Interface methods

S.N.Method & Description
1void addLayoutComponent(String name, Component comp)If the layout manager uses a per-component string, adds the component comp to the layout, associating it with the string specified by name.
2void layoutContainer(Container parent)Lays out the specified container.
3Dimension minimumLayoutSize(Container parent)Calculates the minimum size dimensions for the specified container, given the components it contains.
4Dimension preferredLayoutSize(Container parent)Calculates the preferred size dimensions for the specified container, given the components it contains.
5void removeLayoutComponent(Component comp)Removes the specified component from the layout.

Previous Page:-CLick Here

This Post Has One Comment

Leave a Reply