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,