Java AWT (Abstract Window Toolkit) is an API to develop Graphical User Interface (GUI) or windows-based applications in Java.
Java AWT components are platform-dependent i.e.
components are displayed according to the view of operating system. AWT is
heavy weight i.e. its components are using the resources of underlying
operating system (OS).
The tools provided by the AWT are implemented using
each platform's native GUI toolkit, hence preserving the look and feel of each
platform. This is an advantage of using AWT. But the disadvantage of such an
approach is that GUI designed on one platform may look different when displayed
on another platform that means AWT component are platform dependent.
The
java.awt package provides classes for AWT API such
as TextField, Label, TextArea,
RadioButton, CheckBox, Choice, List etc.
The hierarchy of Java AWT classes are given below:
AWT
Components
All the elements like the button, text fields,
scroll bars, etc. are called components. In Java AWT, there are classes for
each component as shown in above diagram. In order to place every component in
a particular position on a screen, we need to add them to a container.
No comments:
Post a Comment