I have done some digging around on this, however, I still can't seem to figure it out. Please excuse me, I haven't been programming for long.
Background: When I click on my run button it should create a second JFrame and update the background colours of JPanels on the second frame, periodically, once per iteration, throughout the run that the JButton starts.
Problem: The second frame is created, but stays blank until the loop, started by the JButton is finished, and it only displays the final state.
I have tried: invalidate(), validate(), repaint(), setVisible(true). I have tried to run it in a separate thread. I have even tried sleep(), in case it doesn't have enough time to update. Is there something else that I can try?