
Home
|
 
JAVA APPLET
Introduction to layouts
The way that you place components on a form in Java
is probably different from any other GUI system you’ve used. First,
it’s all code; there are no "resources" that control placement
of components. Second, the way components are placed on a form is
controlled by a "layout manager" that decides how the components
lie based on the order that you add( ) them. The size, shape,
and placement of components will be remarkably different from one layout
manager to another. In addition, the layout managers adapt to the
dimensions of your applet or application window, so if that window
dimension is changed (for example, in the HTML page’s applet
specification) the size, shape, and placement of the components could
change.
This section gives you an overview of some layout
managers that the Java platform provides, gives you some general rules for
using layout managers, and then tells you how to use each of the provided
layout managers. It also points to examples of using each layout manager.
Some layouts provided by JAVA
- Flow Layout (Default Layout)
- Border Layout
- Grid Layout
- Card Layout

 |