I have a double for loop inside which I have to repaint JtabbedPane for every cycle. It works well if I put whole method into event-queue
thread. But in that situation I can't interrupt this repainting, because pressing the "Stop repainting" button causes its event to came after all repainting had been done.
But, on the other side, if I put this method (containing double foor loops) into separate thread I get visual missmatch between for loops and repainting of JTabbedPane, because they run in separate threads, i.e. event-queue is always late.
Is there any way I can get information about when JTabbedPane repainting has been finished?