From: Jérôme Benoit Date: Fri, 18 Jan 2019 12:24:17 +0000 (+0100) Subject: Refine the weight max and its drawing. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=dcde664f250e05357878e3802a997a81ba93c61a;p=Persons_Comparator.git Refine the weight max and its drawing. Signed-off-by: Jérôme Benoit --- 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;