posted 12 years ago
Hi everyone! i need to refresh my JPanel with new data, but i could not able to do it....
Here this is the main class of my project. Above CurrentPanel, HoursPanel, DaysPanel are 3 separate classes where i displayed some JLabels and Graphs and JTables, and the corresponding values for them are taken from the database by executing some queries..... In all the classes i performed all the operations and returned the JPanels. i have used a cardlayout and added the 3 (returned) JPanels in the cardlayout panel( i.e mainPanel) All my queries are running properly everything is fine. But i don't know how to refresh the JLabel, JTable and Graphs values with time. I am maintaining a database table with time as a field. As time changes the queries must take the new time values and displayed in the correspnding places of JLabels, JTable and Graphs.....
I don't know how to use timers. i searched in google and tried to apply myself but no any success.... Please guide me. Please give me some suggestion for this. please.... thank you in advance......