0% found this document useful (0 votes)
33 views2 pages

Basic Terminologies: Poonam Pandey Department of Computer Science S. K. Somaiya College

The document discusses basic concepts in GUI programming using Abstract Window Toolkit (AWT). It defines components as elements that allow user interaction, containers as components that can hold other components, and layout managers as determining the positioning of components within containers. It also defines applets as small Java programs that can be run in web browsers to perform tasks like displaying graphics or accepting user input. An example applet is provided that draws a string using the Graphics class.

Uploaded by

Udit Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

Basic Terminologies: Poonam Pandey Department of Computer Science S. K. Somaiya College

The document discusses basic concepts in GUI programming using Abstract Window Toolkit (AWT). It defines components as elements that allow user interaction, containers as components that can hold other components, and layout managers as determining the positioning of components within containers. It also defines applets as small Java programs that can be run in web browsers to perform tasks like displaying graphics or accepting user input. An example applet is provided that draws a string using the Graphics class.

Uploaded by

Udit Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Basic Terminologies 

• Component 
– allow user to interact with the application in various ways – Push button, window etc 
• Container 
– Component that can contain other components – Window, Frame, Applet etc 
• Layout Manager 
– Positions components within a container 
Thus appearance in a GUI is determined by a combination of the components that it contains and the layout manager used to 
position them 
Abstract Window Toolkit (AWT) Lecture 1 – Basics and Applet 
Poonam Pandey Department of Computer Science S. K. Somaiya College 

What is AWT? 
• Set of APIs used for creating GUIs 
• Package: java.awt 
Class Hierarchy 

12-09-2018 

 
Applet 
• Small Java programs used in Internet computing 
• Can be transported over Internet 
• Run using appletviewer or any Web browser that supports Java 
• Can perform arithmetic operations, display graphics, play sounds, accept user input, create animation and play interactive 
games 
HelloJava.java 
import java.awt.Graphics; import java.applet.Applet; /* <HTML> 
<HEAD><TITLE> My First Applet </TITLE> </HEAD> <BODY> 
<APPLET CODE=HelloJava.class height=400 width=400></APPLET> </BODY> </HTML> */ public class HelloJava extends 
Applet { 
public void paint (Graphics g) { 
g.drawString ("Welcome to the world of Graphics", 50, 50); } } 
HelloJava.java 
import java.awt.Graphics; import java.applet.Applet; 
public class HelloJava extends Applet { 
public void paint (Graphics g) { 
g.drawString ("Welcome to the world of Graphics", 50, 50); } } 
HelloJava.html 
<HTML> 
<HEAD> 
<TITLE> My First Applet </TITLE> </HEAD> <BODY> 
<APPLET CODE=HelloJava.class height=400 width=400> </APPLET> </BODY> </HTML> 

12-09-2018 

You might also like