The java.awt.peer package consists entirely of
interface definitions. The hierarchy of these interfaces is
shown in
Figure 22.1.
Each java.awt.peer interface corresponds to one of
the java.awtComponent or
MenuComponent classes, and as you can see from the
figure, the hierarchy of this package is identical to the
hierarchy of those portions of the java.awt package.

The interfaces in this package define the methods that must
be supported by the GUI components on a specific platform.
Porting the java.awt GUI components to a new platform
is a matter of implementing each of the methods in each of the
interfaces in this package on top of the native GUI
components of that platform. The Toolkit object in
the java.awt package collects the implementations of
these peer interfaces for a given platform. Toolkit
contains methods that create instances of each of the
interfaces in this package. Normal applications never need
to instantiate these peers directly; instead they use the
java.awtComponent classes, which create
peers as needed.

Because these peer interfaces are rarely used, and because
the methods are quite similar to those of the corresponding
java.awt component, there is no additional
commentary for the individual interface definitions below.