This commit is contained in:
2022-05-22 23:34:42 +08:00
parent d0416b02bd
commit a9f7967976
30 changed files with 904 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import javax.swing.JLabel;
public class ViewNumber extends View<Controller> {
private JLabel label;
public ViewNumber(Model m, Controller c) {
super(m, c);
this.setTitle("View Number");
this.setSize(150, 150);
label = new JLabel();
update();
this.add(label);
this.setVisible(true);
}
@Override
public void update() {
label.setText("Number of points is: " + m.numberOfPoints());
}
}