This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I made swing application to display data from database (MySQL), but i can't figure it out how to keep the latest data that will be displayed if there new data on database.. should i use timer? and how?
Here is my code..
At the center of non-violence stands the principle of love
.... Martin Luther King, Jr.
Did you go through the Timer API Documentation?
Essentially you need to start the timer, to get it working. When to start the timer, would depend on your requirement. I would suggest, display the current data on the UI and once it is showing , start the timer, so its refreshed every 10 minutes or whatever time interval is specified.