import java.awt.*;
import java.awt.event.*;

public class AdapterFrame extends WindowAdapter {
	public void windowClosing(WindowEvent e){
		System.exit(0);
	}

	public static void main(String[] args){
		Frame f=new Frame();
	//	f.addWindowListener(new AdapterFrame());
		f.setSize(300,200);

		f.setVisible(true);
	}
}
