jQuery in Action, 3rd edition
The moose likes Swing / AWT / SWT and the fly likes repaint problem in jlabel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "repaint problem in jlabel" Watch "repaint problem in jlabel" New topic

repaint problem in jlabel

narasimharao konjeti
Ranch Hand

Joined: Apr 26, 2003
Posts: 130
hi all,
I am replaing on Image(animated gif) on label. but it is not getting repainted...(means animating..) can u help me in this issue.
nr konjeti

"Unwise to sweat petty stuff, wise to pet sweaty stuff."
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

You are going to have to provide your code. Here is the code I used and it animates just fine.

GenRocket - Experts at Building Test Data
Cathy Song
Ranch Hand

Joined: Jul 01, 2003
Posts: 92
Hi All,

I am running Java 1.5.0_04 on windows xp.

I have one animated GIF file and a static GIF file. First I setIcon() to the
JLabel with the static GIF file. Before I perform some activities, I
setIcon() to the JLabel with the animated GIF file so that the user knows
some kind of process is going on. The label gets updated with the animated gif, but the gif looks static, i.e. the animation is lost....why is this happening?

[ August 16, 2005: Message edited by: Cathy Song ]
I agree. Here's the link: http://aspose.com/file-tools
subject: repaint problem in jlabel
It's not a secret anymore!