- 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 - LayoutManager2 Interface
The interface LayoutManager is used to define the interface for classes that know how to lay out containers based on a layout constraints object.
Following is the declaration for java.awt.LayoutManager2 interface −
public interface LayoutManger2 extends LayoutManager
|Sr.No.||Method & Description|
void addLayoutComponent(Component comp, Object constraints)
Adds the specified component to the layout, using the specified constraint object.
float getLayoutAlignmentX(Container target)
Returns the alignment along the x axis.
float getLayoutAlignmentY(Container target)
Returns the alignment along the y axis.
void invalidateLayout(Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.
Dimension maximumLayoutSize(Container target)
Calculates the maximum size dimensions for the specified container, given the components it contains.