• 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

images slideshow

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
im making simple slide show in java fx , i was trying to use Thread but i got infromation that it is wrong way to do that so i'm trying to achieve this by transitions. All examples which i found was written in Main class which extends Application, my question is how can i write this code but in Controller class which implements Initializable.Can someone write simple example for me please?I have some images in ObservableList<Image> and im trying to make slideshow which works like that: when button is pressed it takes first image and display it after 2 seconds it takes another image from ObservableList and display it and so on until list is over.
My code of controller class:

As you can see i was trying to do that in for-loop but it doesn't work...
Thanks in advance,
regards
reply
    Bookmark Topic Watch Topic
  • New Topic