From 2129fc016b74c3a3de498d7bf9f3121bdfd9fbe1 Mon Sep 17 00:00:00 2001 From: top19 Date: Fri, 1 May 2020 09:51:39 +0100 Subject: [PATCH] Updated addwordcontroller. --- .../java/uk/ac/aber/cs221/group20/javafx/AddWordController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/javafx/AddWordController.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/javafx/AddWordController.java index 1cc5f85..25c9d30 100644 --- a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/javafx/AddWordController.java +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/javafx/AddWordController.java @@ -104,7 +104,7 @@ public class AddWordController extends SharedCodeController { } boolean entryFound = false; // test for one or more blank fields and if there is create the correct error dialogue box - if (english.getText() == null || welsh.getText() == null || wordType.getValue().equals("Type")) { + if (english.getText().equals("") || welsh.getText().equals("") || wordType.getValue().equals("Type")) { Alert error = new Alert(Alert.AlertType.ERROR); error.setTitle("Error"); error.setHeaderText("Entry Not Saved");