diff --git a/src/main/java/seedu/address/ui/MainWindow.java b/src/main/java/seedu/address/ui/MainWindow.java index 8a9079468da..0c4f0cf09d3 100644 --- a/src/main/java/seedu/address/ui/MainWindow.java +++ b/src/main/java/seedu/address/ui/MainWindow.java @@ -122,7 +122,7 @@ void fillInnerParts() { noteDisplay = new NoteDisplay(); patientDetailsPlaceholder.getChildren().add(noteDisplay.getRoot()); - noteDisplay.setNoteToUser(logic.getDisplayedNote().value); + noteDisplay.setNoteToUser(logic.getDisplayedNote()); StatusBarFooter statusBarFooter = new StatusBarFooter(logic.getAddressBookFilePath()); statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot()); @@ -185,7 +185,7 @@ private CommandResult executeCommand(String commandText) throws CommandException CommandResult commandResult = logic.execute(commandText); logger.info("Result: " + commandResult.getFeedbackToUser()); resultDisplay.setFeedbackToUser(commandResult.getFeedbackToUser()); - noteDisplay.setNoteToUser(logic.getDisplayedNote().value); + noteDisplay.setNoteToUser(logic.getDisplayedNote()); if (commandResult.isShowHelp()) { handleHelp(); diff --git a/src/main/java/seedu/address/ui/NoteDisplay.java b/src/main/java/seedu/address/ui/NoteDisplay.java index 7016306c9d3..e639303e160 100644 --- a/src/main/java/seedu/address/ui/NoteDisplay.java +++ b/src/main/java/seedu/address/ui/NoteDisplay.java @@ -3,6 +3,7 @@ import javafx.fxml.FXML; import javafx.scene.control.TextArea; import javafx.scene.layout.Region; +import seedu.address.model.person.Note; /** @@ -19,7 +20,7 @@ public NoteDisplay() { super(FXML); } - public void setNoteToUser(String noteToUser) { - noteDisplay.setText(noteToUser); + public void setNoteToUser(Note noteToUser) { + noteDisplay.setText(noteToUser.getDisplayString()); } }