I'm writing something akin to the junit gui that shows each step of
the test passing as it goes. However, the JLabel that shows the
results refuses to repaint itself until the test has completely
finished. I tried calling invalidate() and repaint() on the JLabel
but nothing's working.
How can I force and immediate repaint of a component in swing?
ak - 12 Feb 2004 23:14 GMT
> I'm writing something akin to the junit gui that shows each step of
> the test passing as it goes. However, the JLabel that shows the
> results refuses to repaint itself until the test has completely
> finished. I tried calling invalidate() and repaint() on the JLabel
> but nothing's working.
> How can I force and immediate repaint of a component in swing?
paintImmediately(int x, int y, int w, int h);
paintImmediately(Rectangle r);
--
____________
http://reader.imagero.com the best java image reader.
Shane Mingins - 12 Feb 2004 23:25 GMT
> I'm writing something akin to the junit gui that shows each step of
> the test passing as it goes. However, the JLabel that shows the
[quoted text clipped - 3 lines]
>
> How can I force and immediate repaint of a component in swing?
Does:
label.validate()
label.repaint()
work?
Shane

Signature
"If I say it's grey and has a trunk why do you assume it is an
elephant?"
Jim Sculley - 13 Feb 2004 02:40 GMT
> I'm writing something akin to the junit gui that shows each step of
> the test passing as it goes. However, the JLabel that shows the
[quoted text clipped - 3 lines]
>
> How can I force and immediate repaint of a component in swing?
Stop blocking the event dispatch thread. A Google search for
SwingWorker should yield the information you need.
Jim S.

Signature
Remove my extraneous mandibular appendages to reply via email.
Thomas Weidenfeller - 13 Feb 2004 08:39 GMT
> I'm writing something akin to the junit gui that shows each step of
> the test passing as it goes. However, the JLabel that shows the
> results refuses to repaint itself until the test has completely
> finished.
See this groups's FAQ. It is in the top 5 list of questions.
/Thomas
alan - 13 Feb 2004 22:41 GMT
Thanks for the pointer. I've downloaded the class and will start
playing with it today.
> > I'm writing something akin to the junit gui that shows each step of
> > the test passing as it goes. However, the JLabel that shows the
[quoted text clipped - 4 lines]
>
> /Thomas