diff --git a/src/GUI/GUIController.java b/src/GUI/GUIController.java index f829230..8769a82 100644 --- a/src/GUI/GUIController.java +++ b/src/GUI/GUIController.java @@ -5,13 +5,22 @@ import javafx.fxml.FXML; import javafx.scene.control.Label; public class GUIController { - int pressed; + private int pressed; //put @FXML to let the fxml file know that it can use this label, - // ind of the same as with @Test in jUnit tests + //kind of the same as with @Test in jUnit tests + + /** + *the label to be edited by pressing the button + */ @FXML private Label txtLabel; + /** + * increments the counter when the button is presssed + * @param event an event that happens (button is clicked) + * @throws Exception + */ public void incrementLabel(ActionEvent event) throws Exception { // System.out.println("pressed button"); pressed++; diff --git a/src/GUI/GUIMain.java b/src/GUI/GUIMain.java index 7b85a2b..a728bea 100644 --- a/src/GUI/GUIMain.java +++ b/src/GUI/GUIMain.java @@ -8,10 +8,19 @@ import javafx.stage.Stage; public class GUIMain extends Application { + /** + * launches the stage + * @param args + */ public static void main(String[] args) { launch(args); } + /** + * + * @param primaryStage the stage to be started + * @throws Exception when the fxml file can't be found + */ @Override public void start(Stage primaryStage) throws Exception { //link fxml file diff --git a/src/GUI/LoginController.java b/src/GUI/LoginController.java index 4964a32..bbbb9a7 100644 --- a/src/GUI/LoginController.java +++ b/src/GUI/LoginController.java @@ -28,6 +28,12 @@ public class LoginController { @FXML private Button loginbutton; + /** + * redirects to the main stage when the login credentials are correct + * @param event the entered username and password, and clicking the button + * @throws Exception + * @author Sem van der Hoeven + */ public void Login(ActionEvent event) throws Exception { //if the entered username and password are correct if (usertext.getText().equals("user") && passwordField.getText().equals("pass")) {