affichage ok

This commit is contained in:
Haïssous Kayyissa 2022-04-29 10:57:59 +02:00
parent c301d7b110
commit 64f3f55a97
2 changed files with 3 additions and 3 deletions

View File

@ -12,11 +12,11 @@ public class Chiffre extends JComponent {
@Override
protected void paintComponent(Graphics pinceau) {
Graphics chiffre = pinceau.create();
Font font = new Font("Arial", Font.BOLD, 40);
Font font = new Font("Arial", Font.BOLD, caseSize.width*2/5);
chiffre.setFont(font);
Color jaune = new Color(236, 214, 0);
chiffre.setColor(jaune);
chiffre.drawString(Integer.toString(this.entourage),caseSize.width/3,caseSize.height*8/10);
chiffre.drawString(Integer.toString(this.entourage),caseSize.width*2/5,caseSize.height*3/5);
System.out.println(""+caseSize);
}
}

View File

@ -1,6 +1,6 @@
public class Test {
public static void main(String[] args) {
Grille grille=new Grille(4,8,10);
Grille grille=new Grille(20,25,30);
new FrameJeu(grille, 15);
}
}