Skip to content

Commit 846b497

Browse files
committed
[Ui] - Give title to Gui and move greeting to the first action
1 parent 4b9470d commit 846b497

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/duke/Duke.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ public class Duke {
2323
* Runs the main loop of Duke.
2424
*/
2525
public void run() {
26+
ui.showGreeting();
27+
2628
// Setup in-memory and disk storage
2729
String filePath = "data/tasks.txt";
2830
Storage storage = new TextStorage(filePath);
2931
TaskList tasks = loadTasks(storage);
3032

31-
ui.showGreeting();
32-
3333
activate(new CommandHandler(tasks, ui, storage));
3434

3535
saveTasks(tasks, storage);

src/main/java/duke/Main.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public void start(Stage stage) {
3535
Gui gui = fxmlLoader.<Gui>getController();
3636
gui.setDuke(duke);
3737

38+
stage.setTitle("Duke");
3839
stage.setScene(scene);
3940
stage.resizableProperty().setValue(false);
4041
// Handle case where user manually exits

0 commit comments

Comments
 (0)