From 64f3f55a97fc73fb15727c9e99f6ebebc320d4aa Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Apr 2022 10:57:59 +0200 Subject: [PATCH] affichage ok --- Chiffre.java | 4 ++-- Test.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Chiffre.java b/Chiffre.java index 4a50691..4ed2c11 100644 --- a/Chiffre.java +++ b/Chiffre.java @@ -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); } } diff --git a/Test.java b/Test.java index 5c1287e..b986203 100644 --- a/Test.java +++ b/Test.java @@ -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); } }