Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
Abstract Window Toolkit (AWT) is a collection of graphical user interface (GUI) components (widgets) and other related services required for GUI programming in Java. It is Java’s original platform-independent windowing, graphics and user-interface widget tool kit. AWT is now part of Java Foundation Classes (JFC) and serves as the standard application programming interface (API) for GUI programming in Java.
From J2SE1.2 forward, the AWT widgets were largely superseded by the Swing toolkit. Swing functionality relies on AWT for core interfacing to the native windowing system. However, the programmer now has the choice between the look and feel of the native system and the cross-platform look and feel of Java. Swing is preferred by most Java programmers who still adhere to the write once, run anywhere (WORA) principle at the core of Java’s philosophy.
In 1995, when Sun Microsystems introduced Java as a platform-independent programming language, AWT was intended to provide a thin layer of abstraction over the underlying native user interface. In essence, the same Java program, when run on a Windows PC, would have the look and feel of a native Windows application and the look and feel of a native Mac application when run on a Mac.
AWT includes a set of widgets, which provide the subset of functionality common to all native platforms. AWT also features a robust event-handling model, graphics and imaging tools (including shape, color and font classes), layout managers for flexible window layouts, and data transfer classes for cut-and-paste through the native platform clipboard.