The java.awt package is the Abstract Windowing Toolkit. It can be subdivided into the following three categories. These classes define colors, fonts, images, and etc. A graphical Java program is a set of nested components, starting from the outermost window all the way down to the smallest GUI components. An example of a container is a panel , which can be displayed onscreen.
Applets are a form of panel.
A canvas is a simple drawing surface. Although you can draw on panels, canvases are good for painting images or performing other graphics operations. These components include buttons, simple pop-up menus, check boxes, text fields and etc. These include windows, frames, menu bars, and dialog boxes. These components are used less often, espcially in applets since the browser provides the main window and menu bar.