Skip to content

Commit

Permalink
Display welcome message upon load
Browse files Browse the repository at this point in the history
  • Loading branch information
logical-1985516 committed Feb 24, 2024
1 parent 8878b24 commit 4e41de6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
3 changes: 3 additions & 0 deletions src/main/java/luke/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class MainWindow extends AnchorPane {
@FXML
public void initialize() {
scrollPane.vvalueProperty().bind(dialogContainer.heightProperty());
String welcomeMessage = "Hello! I'm Luke!\n"
+ "What can I do for you?\n";
dialogContainer.getChildren().add(DialogBox.getDukeDialog(welcomeMessage, dukeImage));
}

public void setDuke(Luke d) {
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/luke/Ui.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@
* In charge of printing statements, to confirm to the user that the action is completed.
*/
public class Ui {
/**
* Returns the welcome message.
* @return The welcome message.
*/
public String displayWelcome() {
return "Hello! I'm Luke!\n"
+ "What can I do for you?\n";
}

/**
* Returns the goodbye message.
* @return The goodbye message.
Expand Down

0 comments on commit 4e41de6

Please sign in to comment.