• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
Crusading Chameleon likes the size of this ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic