File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Pause Feature Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Pause Feature" Watch "Pause Feature" New topic
Author

Pause Feature

Kasi Viswan
Ranch Hand

Joined: Sep 27, 2008
Posts: 42
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

Joined: Jul 26, 2007
Posts: 10370
    
    8

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.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pause Feature