• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Card Layout Manager and animated gif's

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
has anyone had problems with putting animated gif's onto labels and then adding them to a panel and adding this panel to a card layout?
it would seem that the paint()mehtod is getting called randomly - and some icons show up and others dont?
any suggestions would be great.
cheers,
Rob.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I am having the same problem with animated GIFs. I have a JApplet that contains a JPanel that contains a JLabel. The applet implements ActionListener and starts a javax.swing.Timer that ticks every 1/10th of a second. After 100 ticks (10 seconds), it changes the ImageIcon in the label. Some icons in the list are animated and some are not.
When the icon is changed to an animated icon, the animation only lasts for one tick, then the icon stops animating. In addition, if I invoke repaint() in the actionPerformed() method, the animated icons disappear.
Any suggestions? I am exploring the use of an ImageObserver.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic