17 Working with Layout
17.1 LAYOUT AND LAYOUT MANAGER
A layout manager automatically arranges the controls within a window by using some types of algorithm. In Java LayoutManager is an interface for classes that know how to lay out Containers. A layout manager is an instance of any class that implements the LayoutManager interface.
The sizes and positions of the components in a container are usually controlled by a layout manager. Different layout managers implement different ways of arranging components. There are several predefined layout manager classes in the AWT: FlowLayout, GridLayout, BorderLayout, CardLayout and GridBagLayout. It is also possible to define new layout managers, if none of these suit one's purpose. Every container is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access