Updated addwordcontroller.

This commit is contained in:
top19 2020-05-01 09:51:39 +01:00
parent 5dcafb889f
commit 2129fc016b

View file

@ -104,7 +104,7 @@ public class AddWordController extends SharedCodeController {
} }
boolean entryFound = false; boolean entryFound = false;
// test for one or more blank fields and if there is create the correct error dialogue box // 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); Alert error = new Alert(Alert.AlertType.ERROR);
error.setTitle("Error"); error.setTitle("Error");
error.setHeaderText("Entry Not Saved"); error.setHeaderText("Entry Not Saved");