SlideShare a Scribd company logo
1 of 5
What is AWT in java
In this section, you will learn about the java.awt.*; package available with JDK. AWT stands
for Abstract Windowing Toolkit. It contains all classes to write the program that interface
between the user and different windowing toolkits. You can use the AWT package to
develop user interface objects like buttons, checkboxes, radio buttons and menus etc.

AWT Components

The class component is extended by all the AWT components. More of the codes can be
put to this class to design lot of AWT components. Most of the AWT components shown
below directly extend Component like Button, Canvas, Label etc.


Buttons

As shown in the example below, a button is represented by a single label. That is the label
shown in the example can be pushed with a click of a mouse.
Label

A displayed label object is known as the Label. Most of the times label is used to
demonstrate the significance of the other parts of the GUI. It helps to display the
functioning of the next text field. A label is also restricted to a single line of text as a button.
The example below shows the significance of Label.

In this example, we have added two labels in the applet as shown.
TextField


A scrollable text display object with one row of characters is known as the TextField. In the
example given below,
Checkbox

A checkbox is again a label which is displayed as a pushbutton as shown in the example
below. This pushbutton can either be checked or unchecked. Therefore, the state of the
checkbox is either true or false. However, the initial state is false which is the default one.
The example below shows the checkbox whose state gets toggled.
What is AWT in Java - An Abstract Windowing Toolkit

More Related Content

Viewers also liked

Viewers also liked (10)

Sistema Génesis y Portales Institucionales
Sistema Génesis y Portales InstitucionalesSistema Génesis y Portales Institucionales
Sistema Génesis y Portales Institucionales
 
Lecture1 oopj
Lecture1 oopjLecture1 oopj
Lecture1 oopj
 
Lecture7 oopj
Lecture7 oopjLecture7 oopj
Lecture7 oopj
 
Lecture3 oopj
Lecture3 oopjLecture3 oopj
Lecture3 oopj
 
02 Hidup ini Pilihan
02 Hidup ini Pilihan02 Hidup ini Pilihan
02 Hidup ini Pilihan
 
Lecture5 oopj
Lecture5 oopjLecture5 oopj
Lecture5 oopj
 
Presentacion
PresentacionPresentacion
Presentacion
 
Lecture4 oopj
Lecture4 oopjLecture4 oopj
Lecture4 oopj
 
Lecture2 oopj
Lecture2 oopjLecture2 oopj
Lecture2 oopj
 
Lecture10 oopj
Lecture10 oopjLecture10 oopj
Lecture10 oopj
 

Similar to What is AWT in Java - An Abstract Windowing Toolkit

Computer Programming NC III - Java Swing.pptx
Computer Programming NC III - Java Swing.pptxComputer Programming NC III - Java Swing.pptx
Computer Programming NC III - Java Swing.pptxjonathancapitulo2
 
Gui programming a review - mixed content
Gui programming   a review - mixed contentGui programming   a review - mixed content
Gui programming a review - mixed contentYogesh Kumar
 
Create formsexcel
Create formsexcelCreate formsexcel
Create formsexcelRavi Gajul
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01JONDHLEPOLY
 
Basic of Abstract Window Toolkit(AWT) in Java
Basic of Abstract Window Toolkit(AWT) in JavaBasic of Abstract Window Toolkit(AWT) in Java
Basic of Abstract Window Toolkit(AWT) in Javasuraj pandey
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01Ankit Dubey
 
Graphical User Interface (Gui)
Graphical User Interface (Gui)Graphical User Interface (Gui)
Graphical User Interface (Gui)Bilal Amjad
 
The visual studio start page is shown in the figure below
The visual studio start page is shown in the figure belowThe visual studio start page is shown in the figure below
The visual studio start page is shown in the figure belowTan Ps
 
Unit IV-Checkboxes and Radio Buttons in VB.Net in VB.NET
Unit IV-Checkboxes    and   Radio Buttons in VB.Net in VB.NET Unit IV-Checkboxes    and   Radio Buttons in VB.Net in VB.NET
Unit IV-Checkboxes and Radio Buttons in VB.Net in VB.NET Ujwala Junghare
 
Ajp notes-chapter-02
Ajp notes-chapter-02Ajp notes-chapter-02
Ajp notes-chapter-02Ankit Dubey
 
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docxAssignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docxssuser562afc1
 
ITS-16163-Module 8-Graphic User Interface (GUI)
ITS-16163-Module 8-Graphic User Interface (GUI)ITS-16163-Module 8-Graphic User Interface (GUI)
ITS-16163-Module 8-Graphic User Interface (GUI)oudesign
 

Similar to What is AWT in Java - An Abstract Windowing Toolkit (20)

Computer Programming NC III - Java Swing.pptx
Computer Programming NC III - Java Swing.pptxComputer Programming NC III - Java Swing.pptx
Computer Programming NC III - Java Swing.pptx
 
Gui programming a review - mixed content
Gui programming   a review - mixed contentGui programming   a review - mixed content
Gui programming a review - mixed content
 
GUI.pdf
GUI.pdfGUI.pdf
GUI.pdf
 
Create formsexcel
Create formsexcelCreate formsexcel
Create formsexcel
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
 
Basic of Abstract Window Toolkit(AWT) in Java
Basic of Abstract Window Toolkit(AWT) in JavaBasic of Abstract Window Toolkit(AWT) in Java
Basic of Abstract Window Toolkit(AWT) in Java
 
Ajp notes-chapter-01
Ajp notes-chapter-01Ajp notes-chapter-01
Ajp notes-chapter-01
 
Ingles 2do parcial
Ingles   2do parcialIngles   2do parcial
Ingles 2do parcial
 
GUI components in Java
GUI components in JavaGUI components in Java
GUI components in Java
 
GUI programming
GUI programmingGUI programming
GUI programming
 
Graphical User Interface (Gui)
Graphical User Interface (Gui)Graphical User Interface (Gui)
Graphical User Interface (Gui)
 
Notes netbeans
Notes netbeansNotes netbeans
Notes netbeans
 
The visual studio start page is shown in the figure below
The visual studio start page is shown in the figure belowThe visual studio start page is shown in the figure below
The visual studio start page is shown in the figure below
 
Unit IV-Checkboxes and Radio Buttons in VB.Net in VB.NET
Unit IV-Checkboxes    and   Radio Buttons in VB.Net in VB.NET Unit IV-Checkboxes    and   Radio Buttons in VB.Net in VB.NET
Unit IV-Checkboxes and Radio Buttons in VB.Net in VB.NET
 
Ajp notes-chapter-02
Ajp notes-chapter-02Ajp notes-chapter-02
Ajp notes-chapter-02
 
Tugas testing
Tugas testingTugas testing
Tugas testing
 
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docxAssignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
 
ITS-16163-Module 8-Graphic User Interface (GUI)
ITS-16163-Module 8-Graphic User Interface (GUI)ITS-16163-Module 8-Graphic User Interface (GUI)
ITS-16163-Module 8-Graphic User Interface (GUI)
 
Maliram poonia project
Maliram poonia projectMaliram poonia project
Maliram poonia project
 
Android interface elements and controls-chapter8
Android interface elements and controls-chapter8Android interface elements and controls-chapter8
Android interface elements and controls-chapter8
 

What is AWT in Java - An Abstract Windowing Toolkit

  • 1. What is AWT in java In this section, you will learn about the java.awt.*; package available with JDK. AWT stands for Abstract Windowing Toolkit. It contains all classes to write the program that interface between the user and different windowing toolkits. You can use the AWT package to develop user interface objects like buttons, checkboxes, radio buttons and menus etc. AWT Components The class component is extended by all the AWT components. More of the codes can be put to this class to design lot of AWT components. Most of the AWT components shown below directly extend Component like Button, Canvas, Label etc. Buttons As shown in the example below, a button is represented by a single label. That is the label shown in the example can be pushed with a click of a mouse.
  • 2. Label A displayed label object is known as the Label. Most of the times label is used to demonstrate the significance of the other parts of the GUI. It helps to display the functioning of the next text field. A label is also restricted to a single line of text as a button. The example below shows the significance of Label. In this example, we have added two labels in the applet as shown.
  • 3. TextField A scrollable text display object with one row of characters is known as the TextField. In the example given below,
  • 4. Checkbox A checkbox is again a label which is displayed as a pushbutton as shown in the example below. This pushbutton can either be checked or unchecked. Therefore, the state of the checkbox is either true or false. However, the initial state is false which is the default one. The example below shows the checkbox whose state gets toggled.