The Abstract Window Toolkit (AWT) is Java's original platform-independent windowing, graphics, and user-interface widget toolkit. The AWT is now part of the Java Foundation Classes (JFC) - the standard API for providing a graphical user interface (GUI) for a Java program.
When Sun Microsystems first released Java in 1995, AWT was criticized as providing only a very thin level of abstraction over the underlying native user interface. This design choice made life difficult for programmers trying to adhere to Java's "Write once, run anywhere" (WORA) motto, since AWT did not guarantee precisely how their applications would look on all computer platforms. A popular joke among programmers in the mid-1990s was that Java's real motto was "Write once, test everywhere."
For example, creating an AWT check box would cause AWT directly to call the underlying native subroutine that created a check box. However, a check box on Microsoft Windows is not exactly the same as a check box on Mac OS or on the various types of UNIX. Some application developers prefer this model because it provides a high degree of fidelity to the underlying native windowing toolkit and seamless integration with native applications. In other words, a GUI program written using AWT looks like a native Microsoft Windows application when run on Windows, but the same program looks like a native Apple Macintosh application when run on a Mac, etc. However, some application developers dislike this model because they prefer their applications to look exactly the same on every platform.
In J2SE 1.2, the AWT's widgets were largely superseded by those of the Swing toolkit. In addition to providing a richer set of UI widgets, Swing draws its own widgets (by using Java 2D to call into low-level subroutines in the local graphics subsystem) instead of relying on the operating system's high-level user interface module. Swing provides the option of using either a native or a cross-platform "look-and-feel" for the application. AWT continues to provide the core of the GUI event subsystem and the interface between the native windowing system and the Java application.
Java platform | Widget toolkits
Abstract Window Toolkit | Abstract Window Toolkit | Abstract Windowing Toolkit | Abstract Windowing Toolkit | AWT | AWT
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Abstract Window Toolkit".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world