AWT Packages

Posted By on November 7, 2014


Download PDF
Graphical User Interface (GUI) in JAVA
Containers and Components

AWT is huge! It consists of 12 packages (Swing is even bigger, with 18 packages as of JDK 1.7!). Fortunately, only 2 packages – java.awt and java.awt.event – are commonly-used.

  1. The java.awt package contains the core AWT graphics classes:
    • GUI Component classes (such as Button, TextField, and Label),
    • GUI Container classes (such as Frame, Panel, Dialog and ScrollPane),
    • Layout managers (such as FlowLayout, BorderLayout and GridLayout),
    • Custom graphics classes (such as Graphics, Color and Font).
  2. The java.awt.event package supports event handling:
    • Event classes (such as ActionEvent, MouseEvent, KeyEvent and WindowEvent),
    • Event Listener Interfaces (such as ActionListener, MouseListener, KeyListener and WindowListener),
    • Event Listener Adapter classes (such as MouseAdapter, KeyAdapter, and WindowAdapter).

AWT provides a platform-independent and device-independent interface to develop graphic programs that runs on all platforms, such as Windows, Mac, and Linux.

Graphical User Interface (GUI) in JAVA
Containers and Components

Download PDF

Posted by Akash Kurup

Founder and C.E.O, World4Engineers Educationist and Entrepreneur by passion. Orator and blogger by hobby

Website: http://world4engineers.com