import java.awt.Frame; import java.awt.event.*; public class Raam2a{ public static void main(String argumendid[]){ Frame f=new Frame("Raam nr 2a"); f.setSize(300, 200); f.setVisible(true); f.addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e){ System.out.println("Programmi ots"); System.exit(0); } }); } }