Add a label to all views.
[Persons_Comparator.git] / src / WeightView.java
index e6b69c54e62fa8fb62be14bd74786fd28d491cb7..239c437556dededfbbaf3839a0dba0b5c528d89b 100644 (file)
@@ -1,5 +1,14 @@
-public class WeightView {
+import javax.swing.*;
+
+public class WeightView extends JComponent {
     private Weight weightObj;
+    private JLabel label;
+
+    WeightView() {
+        this.label = new JLabel();
+        this.label.setText("Weight");
+        add(label);
+    }
 
     WeightView(Weight weightObj) {
         setWeightObj(weightObj);