The initial releases of Java (1.0 and 1.1) included the applet package, and the Applet class therein which can be extended by Java programmers to provide their own applets. An applet is a "small" application intended to run in the user's browser, actually on their own client system. JVMs are built into browsers such as Internet Explorer and Netscape to support applets.
Browsers are graphic in nature, and there are also security issues involved in letting remote code access keyboard, screen, etc., of a user's machine. So alongside the applet package, Sun provide the awt package - the "Abstract Windowing Toolkit".
The lowest levels of graphics programming, where you decide which dots to light to draw a line, are in the specialist realm of the operating system / window system / hardware designer these days. The next level up, where you're placing vectors based on their dot (pixel) positions on the display is also a highly specialist business. All this low level graphics is taken care of for you - the AWT provides drawing in a window; it knows where the window is, whether it's visible, how to control the video memory to make a line / polygon / character / button, etc.
There are many classes in the AWT; basically, they comprise
- classes for drawing and manipulating components
- classes for drawing graphics primitives
- classes for managing the layout of components
- classes for handling events
The java.awt.image package provides additional facilities for image handling, including image manipulation and filtering.
The facilities provided by the awt tend to be somewhat low level (meaning that there's a lot of work to build a simple GUI), and the look and feel varies between platforms as it heavily relies on the local system's look and feel.
In Java 1.2, the swing classes were introduced - javax.swing.*
Swing classes use the awt facilities, but are at a higher level meaning that you need to write less code for more results.
You should bear in mind that although there's a set of Swing classes available for Java 1.1, you're unlikely to find them on many Internet user's browsers - so STICK WITH the awt classes if this is your target market. Companies such as Microsoft, who included Java in their browsers, aren't rushing to upgrade their browsers, and even when they do update there's a long history of users running with old software.
A plugin is available to support Java / Swing on browsers, and if your application is Intranet based (or stand alone), then Swing may be the route for you to go.
See also Swing
Please note that articles in this section of our
web site were current and correct to the best of our ability when published,
but by the nature of our business may go out of date quite quickly. The
quoting of a price, contract term or any other information in this area of
our website is NOT an offer to supply now on those terms - please check
back via our main web site
Extending Graphics in Java 
GUI design - Sketch it out first! (Java / Swing example) - (2007-08-30) 
Java - Client side applet applications as well as server side - (2007-08-29)resource index - Java
Solutions centre home page
You'll find shorter technical items at
The Horse's Mouth
delegate's questions answered at
At Well House Consultants, we provide
subjects such as Ruby, Lua, Perl, Python, Linux, C, C++,
Tcl/Tk, Tomcat, PHP and MySQL. We're asked (and answer)
many questions, and answers to those which are of general
interest are published in this area of our site.