浏览代码

forgot to make the gallery observe the model

tarfeef101 7 年之前
父节点
当前提交
e8a6274d7b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      assignments/a3/src/main/java/Gallery.java

+ 1 - 0
assignments/a3/src/main/java/Gallery.java

@@ -18,6 +18,7 @@ public class Gallery extends JPanel implements Observer
     this.items = new ArrayList();
     reList();
     reFill(3);
+    model.addObserver(this);
   }
 
   /**