At JavaLobby a discussion has been started on LayoutManagers and multiple containers:
Most of the method signatures in the LayoutManager and LayoutManager2 interfaces accept a Container target parameter, for example, the method layoutContainer(Container parent)...
The question is why is the method there if most managers do layout only on a per container basis. Tim Boudreau of Netbeans chimes in and says it is to prevent hackery when it is needed. I can think of a few cases where having a layout manager aware of its parent of container or other containers at a parallel level would be useful. Imagine you have two containers with label/form element pairs. They are split out due to code organization, function, etc. However, in some cases you have them on the same screen. It would be nice if the forms lined up.
I was planning on only writing one custom layout manager in this chapter of the book. However, this has caught my interest. Would it be of use to you the readers if I created a simpled multiple container example as well?