Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pause Feature

 
Kasi Viswan
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a Swing GUI that uses a large input file to make series of web service calls, I would like to add 'Pause' and 'Continue' capability to my GUI.
I have this logic to start the batch job inside a Worker Thread, Can someone please guide me as to how i can bring this Pause and Continue feature into my program.
What i am looking for is how to pause the current execution on clicking a button and resume the execution on a similar event.

Please advice.

Thanks,
Kasi
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way of doing it would be to define a boolean which should be toggled on pause/continue.
After each web service call, check this boolean and process accordingly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic