Sunday 29 September 2013

Multithreading with swing

Multithreading with swing

I have a question about the use of threads in a gui application. Say (as a
simplistic example) i have a swing application with a series of images. I
have two threads i want to run that fetch an image of a parent
respectively. (So for a given number of students, get a mother image and a
father image from each server endpoint). The returned image of the father
and the mother is then appended on to the image on screen so i have a
series of images with a mother, father, mother, father for multiple
students.
How can i schedule this in a multithreaded environment? Each call to get a
mother or father image has to be in parallel and not block the displaying
of the images on screen. Does the image displayed on the screen refresh
after each thread returns an image? How will this be structured?

No comments:

Post a Comment