I am trying to write a simple player application for Mac that takes a directory of BMP images and displays them on screen at a specified FPS. The issue I am facing is how to write the loop that sends the images to the GUI. If I just do a simple loop, the loop runs all the way through and then only shows the last image. What I need is for the loop to run and update the GUI at the same time. I put the loop in a separate thread, but it still does the same thing. Any ideas?