import java.awt.*; public class fenetre extends Frame { fenetre() { setTitle("Bonjour"); resize(200,200); } public boolean handleEvent(Event e) { if (e.id == Event.WINDOW_DESTROY) { dispose(); System.exit(0); } return (super.handleEvent(e)); } public static void main(String[] arg) { fenetre f = new fenetre(); f.show(); } }