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

Practical NO 13

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)
31 views2 pages

Practical NO 13

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

Practical NO.

13
Write a program to demonstrate the use of WindowAdpter Class.

import java.awt.*;
import java.awt.event.*;
public class WindowDemo
{
Frame f;
WindowDemo()
{
f=new Frame("Window Adapter");
f.addWindowListener(new WindowAdapter()
{
public void windowClosing (WindowEvent e)
{
f.dispose();
}
});
f.setTitle("WindowDemo");
f.setSize(400, 400);
f.setLayout(null);
f.setVisible(true);
}
public static void main(String[] args)
{
WindowDemo p13 = new WindowDemo();
}
}

You might also like