Java AWT Containers
Containers allow us to organize components into manageable groups which is extremely important in order to create a good user interface. A component in the AWT can only be used if it is held in a container. A component without a container is like a door without a house. This section covers panels. (Applets are a subclass of panels.), frames, and dialog boxes (which are both subclasses of windows).
Applications (revisited)
Now that you know how to use the Abstract Windowing Toolkit components and how to place them in frames you are ready to create your own Windows applications in Java. Click Here to see the color mixing applet rewritten as a stand-alone application.
We haven't been writing applications in the last few sections simply because we needed to cover the concept of a frame to contain all the graphics and components. You weren't ready to write windows applications, until now. Anything you can do in an applet you can also do in an application. Graphics are contained in a canvas and other components can be placed in sub panels and arranged in any way you like. Remember, an application does not have the file I/O limitations that are imposed on applets so you can actually do much more with an application.
Java gives you the capability to use all that you have learned up to this point in these lessons in either applets or applications. This tutorial should serve as a good beginning foundation for future programming development in Java. If you search the Web, you can find other advanced programming information about Java. There are also some excellent books available on the subject. The more you progress in your studies in Computer Science and study object-oriented programming, the more you will appreciate what Java has to offer and its potential power.