leo277
leo277

Reputation: 445

Javafx pop up reminder as notification at certain time

I'm currently designing a simple task managing program. I want to implement a pop up reminder function for my program. i.e: users can enter some tasks to done by some date. eg: finish report by 2pm 12/10/2014.

I would like to use java or javafx to implement popup reminder where the software will pop a window like 1 hour before the event time.

I have searched on google but the results are mostly related to android programming. So could someone please share with me on what API i should use? or provide me with a hint as to how to implement this.

Thanks in advance!

Upvotes: 1

Views: 2005

Answers (1)

leo277
leo277

Reputation: 445

I managed to solve the problem with ControlsFX notification for the notification window.

code sample: Notifications.create() .title("Task Reminder") .text(eventDescription) .showWarning();

I'm able to create a small pop up window at the bottom right of the screen. However, to use the code, you need to add ControlFx to the project library. And make sure to put the code at where the UI Application is because Javafx only works in the UI tread.

As for the date comparison, just use java Calendar.It has useful APIs in it.

Upvotes: 2

Related Questions