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
|
public class Plateau extends Panel
{
private Label pacman;
private Label vie;
private Labyrinthe laby;
private boolean etat;
public Plateau()
{
super();
//Ajout de la bordure
this.setBackground(Color.WHITE);
//this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
pacman = new Label("PACMAN");
vie = new Label("Vie(s) : ");
laby = new Labyrinthe();
this.setLayout(new BorderLayout());
this.add(pacman, BorderLayout.NORTH);
pacman.setAlignment(1);
this.add(laby, BorderLayout.CENTER);
this.add(vie, BorderLayout.SOUTH);
etat=true;
}
public Labyrinthe getLaby()
{
return laby;
}
public void setLaby(Labyrinthe laby)
{
this.laby = laby;
}
} |