I wrote up a quick demonstration of the different layout managers. It is a simple stand alone application that takes a parameter to dictate which layout manager to demonstrate.

The usage can be found in the README as well as by executing the application without specifying a parameter. It has been included below for convenience:

1
2
3
4
5
6
7
8
9
10
11
Usage:
  java LayoutManagerExamples <layout>
 
  <layout> is one of the following:
      box-x   ->  Box Layout along X-axis
      box-y   ->  Box Layout along Y-axis
      grid    ->  Grid Layout
      flow    ->  Flow Layout
      border1 ->  Border Layout 1
      border2 ->  Border Layout 2
      border3 ->  Border Layout 3

The attached code is released under the GNU General Public License.

Click here to download the source.