Put each view inside its own panel and add each panel to the main panel.
[Persons_Comparator.git] / src / OriginView.java
index 2fc4189df734149123d81aba4f2ed3a0c491190e..3c3b5183367901c7062e77b33ca7beaad310052c 100644 (file)
@@ -1,13 +1,14 @@
 import javax.swing.*;
 
-public class OriginView extends JComponent {
+public class OriginView extends JPanel {
     private Origin originObj;
-
-    OriginView() {
-    }
+    private JLabel label;
 
     OriginView(Origin originObj) {
         setOriginObj(originObj);
+        this.label = new JLabel();
+        this.label.setText("Origin");
+        add(label);
     }
 
     public Origin getOriginObj() {