
- SWING Tutorial
- SWING - Home
- SWING - Overview
- SWING - Environment
- SWING - Controls
- SWING - Event Handling
- SWING - Event Classes
- SWING - Event Listeners
- SWING - Event Adapters
- SWING - Layouts
- SWING - Menu
- SWING - Containers
- SWING Useful Resources
- SWING - Quick Guide
- SWING - Useful Resources
- SWING - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
SWING - LayoutManager Interface
Introduction
The interface LayoutManager is used to define the interface for classes that know how to lay out Containers.
Class Declaration
Following is the declaration for java.awt.LayoutManager interface −
public interface LayoutManager
Interface Methods
Sr.No. | Method & Description |
---|---|
1 |
void 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. |
2 |
void layoutContainer(Container parent) Lays out the specified container. |
3 |
Dimension minimumLayoutSize(Container parent) Calculates the minimum size dimensions for the specified container, given the components it contains. |
4 |
Dimension preferredLayoutSize(Container parent) Calculates the preferred size dimensions for the specified container, given the components it contains. |
5 |
void removeLayoutComponent(Component comp) Removes the specified component from the layout. |