• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

problem in refreshing JPanels

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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......
 
Sometimes you feel like a nut. Sometimes you feel like a tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic