• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

How to load ImageView in TilePane

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

i have a program that should load images from a selected folder and add them to a TilePane, all the loading process it's made within a Task. My problem is when the image loading thread want's to access the TilePane it stops. How should i implement this to work well and fast with folders where there are up to 50-60 images each one more than 2 MB.

 
Rancher
Posts: 387
30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wrap the following call in a call to Platform.runLater.

This will ensure that the actively displayed scene graph is only modified by the JavaFX Application thread (which is a requirement of the JavaFX architecture).
 
Rakoczi Markus
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, thank you - it's working.
 
reply
    Bookmark Topic Watch Topic
  • New Topic