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.