• Post Reply Bookmark Topic Watch Topic
  • New Topic

drawing pictures in JLabel, JPanel

 
seetharaman jayaraman
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
below is my snippet:
______________________________________________
public void actionPerformed(ActionEvent e)
{
lblImage.setIcon(new ImageIcon("c:/test"+cnt+".jpg" );
cnt++;
if(cnt==6)
cnt=1;
repaint();
}
____________________________________________
this actionPerformed() is executed for every 2 seconds. i am displaying continuously 5 pictures in a loop (c:/test1.jpg, c:/test2.jpg...). 5 images are displaying properly. But, they are not of newly updated jpg files. Files used for the 1st loop are used continuously irrespective of newly created files in c: . how to show the files properly so that to get motion movie simulation.
please do help.
thanking you.
___________________________________________________________
 
seetharaman jayaraman
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
thanks to all. its answered here
http://forums.sun.com/thread.jspa?threadID=5340639&messageID=10469648#10469648
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!