I have a standard paintComponent() method that draw some shapes on a Swing JPanel, via Java2D.
Initially, the JPanel surface is displayed with a clean white background.
After the user select a file, I build the shapes (in a separated thread) based on the instructions on the file.
Then, I call JPanel's rapaint() method, you know, will be handled at the EDT.
I can tell when the repaint() processing ends: I just need to look at the new drawings on the screen.
So, this morning I don't have many ideas to answer THE QUESTION: how to know the same information via code?