From dcde664f250e05357878e3802a997a81ba93c61a Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 18 Jan 2019 13:24:17 +0100 Subject: [PATCH] Refine the weight max and its drawing. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/PersonLeftPanel.java | 2 +- src/PersonRightPanel.java | 2 +- src/Weight.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PersonLeftPanel.java b/src/PersonLeftPanel.java index e8cb6f7..4c4d9a4 100644 --- a/src/PersonLeftPanel.java +++ b/src/PersonLeftPanel.java @@ -49,6 +49,6 @@ public class PersonLeftPanel extends JPanel { public void drawWeight(int weight) { Graphics g = this.getGraphics(); g.setColor(Color.black); - g.fillOval(44, 76, 30, (weight * 20) / 600); + g.fillOval(44, 80, 30, (weight * 30) / 250); } } diff --git a/src/PersonRightPanel.java b/src/PersonRightPanel.java index f56b32d..8814863 100644 --- a/src/PersonRightPanel.java +++ b/src/PersonRightPanel.java @@ -50,6 +50,6 @@ public class PersonRightPanel extends JPanel { g2d.fillOval(62, 50, 6, 3); // Weigth g2d.setColor(Color.black); - g2d.fillOval(44, 76, 30, (personObj.getWeight().getWeight() * 20) / 600); + g2d.fillOval(44, 80, 30, (personObj.getWeight().getWeight() * 30) / 250); } } diff --git a/src/Weight.java b/src/Weight.java index 82fa712..c979f3d 100644 --- a/src/Weight.java +++ b/src/Weight.java @@ -1,6 +1,6 @@ public class Weight { private int min = 2; - private int max = 600; + private int max = 250; private int defaultWeight = 72; private int weight; -- 2.34.1