Fix .compareTo() calculation in Size and Weight classes.
[Persons_Comparator.git] / src / EyeView.java
index f88e52eaab8428cf6f785fe8a00c2edd26d1701d..bf047c729fd2e72cace6cb27255c92104cfaa252 100644 (file)
@@ -5,21 +5,18 @@ public class EyeView extends JComponent {
     private JLabel label;
     private JList colorsList;
 
-    EyeView() {
-        setEyeObj(new Eye());
-        this.label = new JLabel();
-        this.label.setText("Eyes color");
-        this.colorsList = new JList(getEyeObj().getColorsList());
-        this.colorsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
-        add(label);
-        add(colorsList);
-    }
-
     /**
      * @param eyeObj
      */
     EyeView(Eye eyeObj) {
         setEyeObj(eyeObj);
+        this.label = new JLabel();
+        this.label.setText("Eyes color");
+        this.colorsList = new JList(this.getEyeObj().getColorsList());
+        this.colorsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+        this.colorsList.setLayoutOrientation(JList.VERTICAL);
+        add(label);
+        add(colorsList);
     }
 
     /**