You are on page 1of 2

Course: Advanced Java, Prepared By: Atul Kabra, 9422279260

Adv Java Lecture-1 Chapter-1 AWT Containers & Event Handling


Topic: Creating Frame (Window)

AWT stands for Abstract Window Toolkit and they are use to create GUI
application in Java.

The awt provides the following:


 A full set of user interface (UI) widgets and other components, including
windows, menus, buttons, check boxes, text fields, scrollbars, and scrolling
lists

 Support for UI containers, which can contain other embedded containers or


UI widgets

 An event system for managing system and user events among parts of the
awt.

 Mechanisms for laying out components in a way that enables platform-


independent UI design

Creating Frame:
 A top level window (that is, a window that is not contained inside another
window) is called a frame in Java.

Course: Advanced Java, Info Planet Programming Classes Prepared By: Atul Kabra, 9422279260
Course: Advanced Java, Prepared By: Atul Kabra, 9422279260

 To create a frame(Window) java provides Frame class which is declared in


AWT package.

 Following program creates and display Frame.


import java.awt.Frame;

class MyFrame
{
public static void main(String [] args)
{
Frame f = new Frame();
f.setSize(300,300);
f.setTitle("Title");
f.setVisible(true);
}
}

Course: Advanced Java, Info Planet Programming Classes Prepared By: Atul Kabra, 9422279260

You might also like