The question is, why do you need something like this? Why do you redraw the entire frame and wait for it to complete. If we know what you are trying to do, we can probably give a better offer.
repaint () just plans to draw. RepaintManager will potentially consolidate several paint requests and do them all at once to make paintng more efficient.
Having said that if you really need to force repaint, you can use
JComponent.paintImmediately(...);
, .