mirror of
https://github.com/guezoloic/racing-game.git
synced 2026-03-28 18:03:50 +00:00
feat: fenetre principal et dashboard pret
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user