The Design of the Java AWT is an excellent example of using classes, inheritances, and interfaces. The AWT contains the following essential classes. The class’s hierarchical relationship is shown below.
Component: This is a super class of all AWT user interface classes.
Container: This is used to group components. A container can be embedded in another container. A layout manager is used to position and place the components in the desired location and style in a container. Example of containers are frames and panels.
Window: The window class can be sued to create a top-level windows, however, often Window’s subclasses-Frame and Dialog-are used instead.
Frame: This is a window that is not contained inside another window. Frame is the basis to contain other user interface components in Java Graphical Applications.
Dialog: This is a pop-up window that is usually used as a temporary window to receive additional information from the user or to provide notification that an event has occurred.
Panel: This is an invisible container that holds user interface components. You can place panels in a frame in Java applications or in an applet in Java applets.
Applet: This is a subclass of Panel. Anything you place in a panel can also be placed in an applet. You use Frame when writing applications and Applet when writing applets.
Graphics: This is an abstract class that provides a graphical context for drawing strings, lines and shapes.
Color: This deals with colors of graphics components. For example, you can specify background or foreground colors in a component, such as Frame and Panel, or you can specify colors of lines, shapes and strings in drawing.
Font: This is used to draw strings in Graphics. For example, you can specify the font type (Times New Roman), style (Bold), and size (24 points) for string.
FontMetrics: This is an abstract class that is used to get properties of the fonts used in drawings.
The remaining classes like, Button, Canvas, Checkbox, Menu, Choice, Label, List, Scrollbar, TextField, and TextArea are for constructing the GUI for Java applet program.