feat: fenetre principal et dashboard pret

This commit is contained in:
2025-11-09 13:59:03 +01:00
parent ea260adbc7
commit da8dccc72f
4 changed files with 45 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
@@ -29,12 +30,17 @@ public class Dashboard extends GameView
this.button = new JButton();
// ajout background
setBackground(car.getColor());
frame.setBackground(car.getColor());
init(fn);
frame.add(label);
frame.add(button);
// mettre un layout (text au centre et bouton en bas)
// this.setLayout(new BorderLayout());
// this.add(label, BorderLayout.CENTER);
// this.add(button, BorderLayout.SOUTH);
this.setLayout(new BorderLayout());
this.add(label, BorderLayout.CENTER);
this.add(button, BorderLayout.SOUTH);
}
// fonction uniquement pour l'affichage dynamique