final project q11
This commit is contained in:
18
finalproject/Question11/View.java
Normal file
18
finalproject/Question11/View.java
Normal file
@@ -0,0 +1,18 @@
|
||||
import javax.swing.JFrame;
|
||||
|
||||
public abstract class View<T extends Controller> extends JFrame implements ModelListener {
|
||||
protected Library m;
|
||||
protected T c;
|
||||
|
||||
public View(Library m, T c) {
|
||||
this.m = m;
|
||||
this.c = c;
|
||||
|
||||
m.addListener(this);
|
||||
|
||||
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
this.setLocationRelativeTo(null);
|
||||
}
|
||||
|
||||
public abstract void update();
|
||||
}
|
||||
Reference in New Issue
Block a user