import java.awt.event.*; class Raami2kuular extends WindowAdapter{ public void windowClosing(WindowEvent e){ System.out.println("Programmi ots"); System.exit(0); } }