• Post Reply Bookmark Topic Watch Topic
  • New Topic

Blinking Threads....  RSS feed

 
Marcus Hathaway
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,

I have an annoying problem with a thread. My thread updates a JList showing items from a database. If client A adds something to the database then client B will see the JList update. Everything works great...the thread is programmed to sleep for 1 second before updating.

However, the JList seems to blink in time with the thread. Anybody know a way of stopping it blink??! Its driving me mad!

Cheers!
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll move this to the Swing section, where I bet several people will answer.
 
Stuart Gray
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post some code please? In particular your actionPerformed method.
 
Marcus Hathaway
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Stuart,

The offending code (i think) is listed below. I won't post the entire class as its a bit long....


Additionally the relevant code in the UpdateThread looks like:



Any ideas!? Probably my poor quality coding causing the blinking!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!