Page 409 - CITS - Computer Software Application -TT
P. 409
COMPUTER SOFTWARE APPLICATION - CITS
LESSON 116 - 119 : Abstract Windowing Tool Kit
Abstract Windowing Toolkit
The Abstract Windowing Toolkit (AWT) is a library of Java GUI object classes that is included with the Java
Development Kit from Sun Microsystems. The AWT handles common interface elements for windowing
environments including Windows.
The AWT contains the following set of GUI components:
Button
CheckBox
CheckBox Group (RadioList)
Choice (PopupList)
Label (StaticText)
List (ListBox)
Scroll Bar
Text Component (TextField)
Menu
Introduction to user interface and AWT components and containers
Introduction to the AWT:-
A description of Java’s user interface toolkit
The Java programming language class library provides a user interface toolkit called the Abstract Windowing
Toolkit, or the AWT. The AWT is both powerful and flexible. Newcomers, however, often find that its power is
veiled. The class and method descriptions found in the distributed documentation provide little guidance for the
new programmer. Furthermore, the available examples often leave many important questions unanswered. Of
course, newcomers should expect some difficulty. Effective graphical user interfaces are inherently challenging to
design and implement, and the sometimes complicated interactions between classes in the AWT only make this
task more complex. However, with proper guidance, the creation of a graphical user interface using the AWT is
not only possible, but relatively straightforward.
This article covers some of the philosophy behind the AWT and addresses the practical concern of how to create
a simple user interface for an applet or application.
What is a user interface:-
The user interface is that part of a program that interacts with the user of the program. User interfaces take many
forms. These forms range in complexity from simple command-line interfaces to the point-and-click graphical user
interfaces provided by many modern applications.
[ Also on InfoWorld: Why software engineering estimates are garbage]
At the lowest level, the operating system transmits information from the mouse and keyboard to the program as
input, and provides pixels for program output. The AWT was designed so that programmers don’t have worry
about the details of tracking the mouse or reading the keyboard, nor attend to the details of writing to the screen.
The AWT provides a well-designed object-oriented interface to these low-level services and resources.
Because the Java programming language is platform-independent, the AWT must also be platform-independent.
The AWT was designed to provide a common set of tools for graphical user interface design that work on a variety
of platforms. The user interface elements provided by the AWT are implemented using each platform’s native
GUI toolkit, thereby preserving the look and feel of each platform. This is one of the AWT’s strongest points. The
disadvantage of such an approach is the fact that a graphical user interface designed on one platform may look
different when displayed on another platform.
396