This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Murach's Java Programming and have Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Updating a Thread variable.  RSS feed

 
GoodVic Hunting
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ladies n Gents,

A bit of help please.

I have a gui which contains a bunch of buttons. Each button corresponds to a process that I am monitoring. When a button is clicked, I need to display any messages pertaining to that process that I have. When an another button in clicked, I abandon the previous process and display updates for the another process.

My initial design was to have one thread which will display message for all the processes. Whenever a different button is clicked, I will update a variable in the thread to indicate it to get the update for a different process. This however, is not working, the thread starts and runs fine for the first click but doesn't seem to get notified when the second button is clicked.




Any Ideas, links would be appreciated.

Cheers
 
Harish Kashyap
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interrupting the thread may be helpful in this scenario
 
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!