package projet; import java.awt.*; import java.awt.event.*; public class Fenetre extends Frame implements WindowListener { Button b1; Button b2; TextField t2; Label l2 ; Fenetre() { setSize(400,500); setTitle ("Simulator"); setVisible(true); setLayout(null); //bouton b1 b1 = new Button("Send"); b1.setBounds(20,450,60,20); add(b1); //bouton2 b2 = new Button("Erase"); b2.setBounds(300,450,60,20); add(b2); // text t2 t2 = new TextField(); t2.setBounds(50,140,300,300); add(t2); // label l2 l2= new Label ("Enter your trial text"); l2.setBounds(20,70,100,100); add(l2); //ajout de la fermeture addWindowListener(this); }//fin constructeur //souris public void windowClosing (WindowEvent e){ System.exit(1);} public void windowActivated (WindowEvent e){} public void windowClosed (WindowEvent e){} public void windowDeactivated (WindowEvent e){} public void windowDeiconified (WindowEvent e){} public void windowIconified (WindowEvent e){} public void windowOpened (WindowEvent e){} }