1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| import java.awt.*;
import java.awt.event.*;
class MenuModifier extends Frame {
//public Panel pane2;
//public GridBagLayout gridbag;
//public GridBagConstraints constraints;
//Label nom;
//Label prenom;
//Label adresse;
//Label ville;
//Label commune;
//Label dateNaiss;
//Label numTel;
public MenuModifier() {
super("Menu Modifier");
//this.interf=interf; //AJOUT
System.out.println("Start program...");
setBounds(100, 100, 800, 600);
//pane2 = new Panel();
this.setBackground(Color.gray);
this.setLayout(new BorderLayout());
Panel panel = new Panel();
{
GridLayout grid = new GridLayout(1, 7, 2, 2);
panel.setLayout(grid);
panel.add(new Label("Nom"), "North");
panel.add(new Label("Prénom"), "North");
panel.add(new Label("Adresse"), "North");
panel.add(new Label("Ville"), "North");
panel.add(new Label("Commune"), "North");
panel.add(new Label("Date de naissance"), "North");
panel.add(new Label("Numéro de téléphone"), "North");
}
this.add(panel,BorderLayout.NORTH);
show();
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
dispose();
System.out.println("fermeture de la fenetre -modifier-");
}
});
}
public static void main(String[] args) {
MenuModifier mod = new MenuModifier();
}
} |
Partager