import java.awt.*;
import java.awt.event.*;
public class twentyseven extends Frame implements WindowListener {
public
salout() {
setBackground(Color.white);
setSize(300,200);
addWindowListener(this);
setTitle("Essai");
}
public void paint(Graphics g) {
int x=(getSize().width-80)/2;
int y=(getSize().height-20)/2;
g.drawString("Salout !", x,y);
}
public void windowClosing(WindowEvent event) {
System.exit(0);
}
public void windowClosed(WindowEvent event) {}
public void windowDeiconified(WindowEvent event) {}
public void windowIconified(WindowEvent event) {}
public void windowActivated(WindowEvent event) {}
public void windowDeactivated(WindowEvent event) {}
public void windowOpened(WindowEvent event) {}
public static void main(String args[]) {
System.out.println("Chargement en cours...");
salout s = new
salout();
s.show();
}
}
Partager