aspose file tools*
The moose likes Java in General and the fly likes AsyncTask class in Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "AsyncTask class in Java?" Watch "AsyncTask class in Java?" New topic
Author

AsyncTask class in Java?

L Purcell
Greenhorn

Joined: Feb 19, 2012
Posts: 12
The AsyncTask class in Android is a clean and simple way to create and handle simple threads. Is there a similar class in JAVA? I haven't found anything quite like that...
Thanks,
Alexei Kaigorodov
Greenhorn

Joined: Feb 24, 2008
Posts: 17
SwingWorker?
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7807
    
  21

L Purcell wrote:The AsyncTask class in Android is a clean and simple way to create and handle simple threads. Is there a similar class in JAVA? I haven't found anything quite like that...

Runnable?

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Winston Gutkowski wrote:Runnable?

AsyncTask does more than that. Not only does it run in a background thread, but it also has facilities to post updates in the UI thread. SwingWorker would indeed be a closer approximation in Java.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19696
    
  20

Also check out this thread about SecondaryLoop.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
L Purcell
Greenhorn

Joined: Feb 19, 2012
Posts: 12
Thanks, everyone! I'll look into those ideas.
L
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AsyncTask class in Java?