Please look at my code I have been trying to execute slide show using the 
same code that you gave but when I run this code it shows nothing. Please 
reply me I am working on my Final year project.  really need help.

 public void onModuleLoad() {
        

 Image base = new Image("resources/images/1.png");
   VerticalPanel img = new VerticalPanel();
   
     img.add(base);
  

final List imageURLs = new ArrayList(); 
// Add image urls to the above list 
 imageURLs.add("resources/images/1.png");
 imageURLs.add("resources/images/1.png");
 imageURLs.add("resources/images/1.png");
    

Timer timer = new Timer() { 
     int index = 0; 
            @Override
      public void run() { 
         
/*Set image URL to the image object created else where in your code*/ 
        //image.setUrl((String)imageURLs.get(index); 
           image.setUrl((String)imageURLs.get(index));
        index++; 
        if( ( imageURLs .size() -1) == index){ 
                index = 0; 
        } 
      } 
    }; 
//timer.scheduleRepeating(1000) ; 

RootPanel.get().add(img); 
timer.scheduleRepeating(5000) ;
       
       
    
        
    }
}

On Wednesday, August 6, 2008 9:49:07 PM UTC+5, Srini Marreddy wrote:
>
> Use GWT Timer class and schedule the URL Change in run method. The 
> code will be roughly like this. 
>
> List imageURLs = new ArrayList(); 
> // Add image urls to the above list 
>
> Timer timer = new Timer() { 
>      int index = 0; 
>       public void run() { 
> /*Set image URL to the image object created else where in your code*/ 
>         image.setUrl((String)imageURLs.get(index); 
>         index++; 
>         if( ( imageURLs .size() -1) == index){ 
>                 index = 0; 
>         } 
>       } 
>     }; 
> timer.scheduleRepeating(1000)        ; 
>
> -Srini 
>
> timer. 
> On Aug 6, 9:37 am, Gaunt Face <[email protected]> wrote: 
> > Hey everyone 
> > 
> > I hope that this isn't a stupid question, I'm new to new GWT been 
> > playing around with it for couple of days attempting to re-vamp an 
> > existing website. 
> > 
> > Im trying to create a very simple photo slideshow that loops around 3 
> > images and displaying them. 
> > 
> > While I understand how to get the image to display and also how to 
> > make it change from a user click, I can't get my head around how to 
> > make my application do this on its own. 
> > 
> > Can anyone just point me in the right direction? 
> > 
> > Many Thanks 
> > Gaunt

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/IEHrUvVQVesJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to