java - Display animated gif on jPanel -


in overridden function jframe:

@override protected void paintcomponent(graphics g) {      bufferedimage imageperson;     try {         imageperson = imageio.read(new file("errol.gif"));     } catch (ioexception e) {         imageperson = null;     }      g.drawimage(imageperson, * increment, j * increment - 1, null); } 

how can change animation on gif shown (without using threading). have spent many hours trying work no avail.

you use imageicon purpose. have here , here. if need animation on jpanel, add jlabel (with imageicon) panel.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -