O'Reilly logo

Graphic Java™ 1.2, Volume I: AWT, Third Edition by David M. Geary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Standard AWT Layout Managers

The AWT comes with five standard layout managers, as shown in Table 10-4.

The designers of the AWT hit a home run with the implementation of layout management and event handling by employing the strategy pattern for each.[8] Containers are not responsible for laying out their own components; they delegate that responsibility to a layout manager. By encapsulating the algorithm for laying out components in a separate class, the layout functionality is available for others to use (and extend), while containers may be fitted with different layout managers at runtime. The same benefits apply for the delegation-based event model. The AWT designers also did a decent job of providing a set of default layout managers, which ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required