This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JavaFX and the fly likes How to load ImageView in TilePane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "How to load ImageView in TilePane" Watch "How to load ImageView in TilePane" New topic
Author

How to load ImageView in TilePane

Rakoczi Markus
Greenhorn

Joined: Mar 13, 2012
Posts: 13
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.

John Damien Smith
Ranch Hand

Joined: Jan 26, 2012
Posts: 213
    
    9
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

Joined: Mar 13, 2012
Posts: 13
Thank you, thank you - it's working.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to load ImageView in TilePane
 
It's not a secret anymore!