I am working on a standalone swing application.I have created trees by taking the values form the database.
So now the problem is i want to reload each tree,on database change so that each tree will have the current database tables values.
any type of guidance will be appreciated.
Write a job / task / thread to run in background and query the database from time to time and notify all listeners about the changes in the database that anyone is interested in. One of such listeners would be your tree.
However, be careful on how often you hit the database, you may cause performance issues.