• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

invoke applet method repeatedly .. ?

Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an applet (bidding room) that needs to 'refresh' the current names of users bidding in the room and display them in a TextArea.
THis needs to be done, say every 5 seconds ...
I have a method getUsers() in the applet, the start() method makes a call to this method.
how can i include some code so that, after a certain time interval, the getUsers() method is called repeatedly .... so that the latest group of users can be displayed .. ?
also even if this can be done, does the jsp page containing the applet need to be refreshed for the results to be shown ?
i know how to use refresh meta tag, but it does not look good -- i know yahoo chat does not need to refresh the page to show latest results..
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sarim,
You can use the Timer class to call a method repeatedly.
If you are changing the contents of your applet component you don't need to refresh the page. If you are setting some javaScript component contents then something will need to be refreshed.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!