How to update in real time
Hello,
I have an application that fills a jlist from a mysql database.
I've implemented an updateList() function that I use for updating the list after a create or delete operation.
So here is my question:
How do I update the list in real time...meaning...if the database is modified outside the application(say the MySql Command Line Program) I want my list to update automaticaly.....without any refresh button or any stuff like that.
I was thinking of a function (or something) that runs in the background and checks the database every 5 or 10 seconds...but I have no ideea how to implement something like that.
Any ideas?