• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

threads & progressbar

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Greetings!

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.

cheers,
Sai :-)
 
He was expelled for perverse baking experiments. This tiny ad is a model student:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic