This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes AsyncTask class in Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply 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: 4761
    
    7

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?
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2407
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: 19216

Also check out this thread about SecondaryLoop.


SCJP 1.4 - SCJP 6 - SCWCD 5
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?
 
Similar Threads
Socket communication
Concurrency in Android
A question about multithreading
Query regarding AlertDialog
Android and code bloat