import java.awt.*; import java.awt.event.*; class Aken{ static void main(String argumendid[]){ final Window w=new Window(new Frame()); final Button b=new Button("OK"); w.add("South", b); w.setSize(300, 200); w.setLocation(300, 200); w.setBackground(Color.yellow); w.setVisible(true); b.addMouseListener( new MouseAdapter(){ public void mousePressed(MouseEvent e){ System.exit(0); } } ); } }