import java.awt.*;
import java.awt.event.*;
class example1 extends Frame
{
public
example1(String title)
{
super(title);
MyWindowAdapter
adapter=new MyWindowAdapter(this);
addWindowListener(adapter);
}
class
MyWindowAdapter extends WindowAdapter
{
example1
e1;
public
MyWindowAdapter(example1 e1)
{
}
public
void windowClosing(WindowEvent ae)
{
e1.dispose();
}
}
public static
void main(String args[])
{
Frame
f1=new Frame("IETE" );
f1.setVisible(true);
f1.setSize(200,200);
}
}