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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.