Threading and Node.lookup

Philipp Dörfler phdoerfler at
Tue Mar 19 15:33:54 PDT 2013


does fooNode.lookup("#bar") have to be called using Platform.runLater if fooNode is not attached to any Scene?
As to my understanding, one only has to use Platform.runLater for accessing nodes already attached to a Scene.

However, fooNode.lookup seems to fail (= return null) for nodes which are not contained directly in it, but in another node (in my case: a ScrollPane), which is then contained in fooNode. The scene graph was provided by FXMLLoader.load(...).

Placing those lookups in Platform.runLater suddenly causes them to work.

This feels like an arcane bug to me, but I might be missing some core concepts.
So - did I miss something or is this a bug?


More information about the openjfx-dev mailing list