Skip to content

Commit

Permalink
Add delay exit functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Tishya Khanna committed Oct 26, 2019
1 parent 9fa79fa commit 233d446
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/seedu/address/ui/MainWindow.java
@@ -1,5 +1,7 @@
package seedu.address.ui;

import java.util.Timer;
import java.util.TimerTask;
import java.util.logging.Logger;

import javafx.event.ActionEvent;
Expand Down Expand Up @@ -211,6 +213,22 @@ private void handleExit() {
primaryStage.hide();
}

/**
* Quit after letting user read the Bye
*
*/

public void exit() {
TimerTask myDelay = new TimerTask() {
@Override
public void run() {
System.exit(0);
}
};
Timer timer = new Timer();
timer.schedule(myDelay,1500);
}

public PersonListPanel getPersonListPanel() {
return personListPanel;
}
Expand Down

0 comments on commit 233d446

Please sign in to comment.