Custom Layout Managers

While Although the AWT's standard layout managers are well equipped to handle most layout situations, there comes a time when they just won't do. You will also find that for certain types of layouts, it is simpler to use a custom layout manager that deals with an exact type of layout than it is to use one of the AWT's layout managers, even though one of them may suffice.

A custom layout manager involves implementing the LayoutManager or LayoutManager2 interfaces.

We've discussed each of these methods in detail earlier in this chapter, so instead of rehashing the responsibilities of each method, let's take a look at some custom layout managers that implement them.

BulletinLayout

This section describes a layout manager—

Get Graphic Java™ 1.2, Volume I: AWT, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.