Refine the weight max and its drawing.
[Persons_Comparator.git] / src / PersonLeftPanel.java
index d01abd000b1ef5ee56f946d2d034e2f9cc6f53dd..4c4d9a40203dafb50e32aa9e3eb300baacbb4fa6 100644 (file)
@@ -14,7 +14,7 @@ public class PersonLeftPanel extends JPanel {
         try {
             this.personImage = ImageIO.read(new File("data/personImage.png"));
         } catch (IOException e) {
-            System.out.println(e.getStackTrace());
+            e.printStackTrace();
         }
     }
 
@@ -45,4 +45,10 @@ public class PersonLeftPanel extends JPanel {
         g.fillOval(50, 50, 6, 3);
         g.fillOval(62, 50, 6, 3);
     }
+
+    public void drawWeight(int weight) {
+        Graphics g = this.getGraphics();
+        g.setColor(Color.black);
+        g.fillOval(44, 80, 30, (weight * 30) / 250);
+    }
 }