title: Force immediate layout and paint in Swing
body: <p>I cannot seem to force a layout in Swing. I have a <code>JComponent</code> added to a <code>JLayeredPane</code> and I set a border on the <code>JComponent</code>. Then, I want to immediately re-draw everything - not in the sense of "please do this asap" like <code>invalidate()</code>, but synchronously and immediately. Any help? I cannot seem to find the right method of doing this, and all my reading about <code>invalidate(), validate(), repaint(), doLayout(), etc</code> is just confusing me more!</p>