Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / February 2004

Tip: Looking for answers? Try searching our database.

Forcing a repaint of a JLabel...

Thread view: 
alan - 12 Feb 2004 23:02 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?
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.