diff --git a/resources/fxml/MainWindow.fxml b/resources/fxml/MainWindow.fxml
index ccea9d8..dd270bd 100644
--- a/resources/fxml/MainWindow.fxml
+++ b/resources/fxml/MainWindow.fxml
@@ -1,11 +1,28 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/view/MainWindow.java b/src/view/MainWindow.java
index e8c6704..eb8211d 100644
--- a/src/view/MainWindow.java
+++ b/src/view/MainWindow.java
@@ -1,11 +1,42 @@
package view;
+import javafx.fxml.FXML;
+import javafx.scene.control.ListView;
+import javafx.scene.control.TextField;
import viewmodel.PromotionVM;
+import viewmodel.StudentVM;
public class MainWindow {
+ @FXML
+ private ListView promLV;
+ @FXML
+ private TextField lastnameTF;
+ @FXML
+ private TextField firstnameTF;
+
+ @FXML
+ private void clickAddStudent() {
+ VM.addStudent();
+ }
+
+ @FXML
+ private void clickRemoveStudent() {
+ VM.removeStudent(promLV.getSelectionModel().getSelectedItem());
+ }
+
+ @FXML
+ private void clickQuit() {
+ lastnameTF.getScene().getWindow().hide();
+ }
+
private final PromotionVM VM;
public MainWindow(PromotionVM VM) {
this.VM = VM;
}
+
+ @FXML
+ private void initialize() {
+
+ }
}
diff --git a/src/viewmodel/PromotionVM.java b/src/viewmodel/PromotionVM.java
index 19743c6..27ef4cc 100644
--- a/src/viewmodel/PromotionVM.java
+++ b/src/viewmodel/PromotionVM.java
@@ -17,4 +17,12 @@ public class PromotionVM {
public Promotion getModel() {
return model;
}
+
+ public void addStudent(StudentVM toAdd) {
+ }
+
+ public void addStudent() { addStudent(new StudentVM()); }
+
+ public void removeStudent(StudentVM toRemove) {
+ }
}