Home Java Tutorial Java AWT tutorial for beginners

Java AWT tutorial for beginners

by anupmaurya

Java AWT  (Abstract Window Toolkit). It is a platform dependent API for creating Graphical User Interface (GUI) for java programs.

Java AWT components are platform-dependent i.e. components are displayed according to the view of the operating system. AWT is heavyweight as its components are using the resources of OS.

Why AWT is platform dependent? 

Java AWT calls native platform (Operating systems) subroutine for creating components such as textbox, checkbox, button, etc. For example, an AWT GUI having a button would have a different look and feel across platforms like Windows, Mac OS & Unix, this is because these platforms have different look and feel for their native buttons and AWT directly calls their native subroutine that creates the button. In simple, an application build on AWT would look like a windows application when it runs on Windows, but the same application would look like a Mac application when runs on Mac OS.

The java.awt package provides classes for AWT API such as TextField, LabelTextArea, RadioButton, CheckBox, Choice, List, etc.

JAVA AWT HIERARCHY

Java AWT tutorial for beginners
Java AWT Hierarchy

You may also like

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.