Other Layout styles include the BorderLayout, which divides the screen into a grid - wast, center, west, north, and south, the GridLayout, the GridBagLayout, the CardLayout, and so on. We will use the BorderLayout for this applet. The default layout manager is called a FlowLayout. Containers primarily hold GUI objects. Another important example of a Container is a Panel.
Containers can, of course, hold containers.
Our Applet will have a Panel for holding both a Label and a Button. Panels can have their own layout managers, although we will use the default on for our Panel. We will examine the code line by line. The following code needs to be saved in a file called lesson3.java. The new parts of code in this applet are found in the init function.