Question on GUI Applications

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question on GUI Applications

Amarnath Nanduri
Hi,

   Was anybody successful in using the ListenerExamples.java from the book "Java Concurrency in Practise" in chapter 9? I am trying to use it to display information from a Database, while giving the end user the option to cancel if it takes too much time. I would appreciate a full blown example in using the classes from this chapter.

Thanks,
Amar..


Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta.
_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
Reply | Threaded
Open this post in threaded view
|

Re: Question on GUI Applications

tpeierls
Those examples are mainly to illustrate various techniques; they aren't meant to be used directly (they are all private methods). For production systems, you probably want to use the SwingWorker utility. It's standard with Java 6, but if you can't wait that long, the BackgroundTask class from JCiP chapter 9 is a reasonable stop-gap measure -- it has a cancel method and a get with timeout method. It hasn't been tested seriously, however, so proceed with caution and please let us know of any problems you find with it.

--tim

On 8/13/06, Amarnath Nanduri <[hidden email]> wrote:
Hi,

   Was anybody successful in using the ListenerExamples.java from the book "Java Concurrency in Practise" in chapter 9? I am trying to use it to display information from a Database, while giving the end user the option to cancel if it takes too much time. I would appreciate a full blown example in using the classes from this chapter.

Thanks,
Amar..


Do you Yahoo!?
Everyone is raving about the <a href="http://us.rd.yahoo.com/evt=42297/*http://advision.webevents.yahoo.com/handraisers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> all-new Yahoo! Mail Beta.


_______________________________________________
Concurrency-interest mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest" target="_blank">http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest




_______________________________________________
Concurrency-interest mailing list
[hidden email]
http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest