Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

threads & progressbar

Sainath Veepuri
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,


I have a JTree on the left side of my JFrame and a JTable on to the right side. The JTree has different nodes showing different Experiments in a biotech lab. Selecting a particular Experimentnode, should get all the related information from the database and populate it into the JTable. Since my retrieved dataset is very huge, am showing a ProgressBar on my JTable.

NodeSelection ==> DBTransaction ==> Fill Jtable
(while filling i show a progressbar)

For the sake of ProgressBar, i have used Threads in my application.
The moment a node is selected the start method is called.

In the present scenario, the user has a chance to click on another node even before the first selected node completes its execution.
so in my run() method, i'am trying to check if the thread is null or not, else i would nullify it.

But some times, my progressbar is getting stuck.

What should i do to avoid this?

I sincerely thank for sparing ur valuable time in reading my post.

Sai :-)
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic