Monday, May 7, 2007

What is a Layout Manager and what are its different types and their advantages?

In Java,a GUI component does not decide about its geometry(location and size) on its own.A layout manager is an object which is responsible for managing or arranging the size and location of a GUI component.In AWT there are following layout managers which are supported:

-Flow
-Border
-GridBag
-Card
-GridBag

These layout managers organizes components consistently across all windowing platforms. Irrespective of underlying windowing OS,layouts behave in a regular fashion and show GUI components.A layout manager also represents an instance of a class which implements LayoutManager interface.The layout manager is set by setLayout(LayoutManager layoutManager) method.

0 comments :

 

Disclaimer
Interview Questions On Java,Java EE Copyright © 2016. Reads: best tracker