Jim Clarke wrote:
OK, if I understand you then the key is line 1 because of the declaration of the var 'scene' which allows you to access the contents of the Scene object. But I'm wondering about accessing the Stage's scene property without an external variable because that's the way the code is generated in NetBeans, and I suspect it's either the standard way of writing JavaFX, or it will be the soon.
So, if you have code like this:
Is there a way to get a reference to the properties of the Text object? It seems to me that there's some code generation or inheritance going on behind the scenes (pardon the pun) because every JavaFX class that doesn't explicitly extend another class extends Object - just like it does in
Java. That coupled with the fact that we create a run() method instead of a main() method makes me think that the above script gets rolled into a class of some kind; in which case the Stage instance could be being assigned to some property of that class - which means I might be able to access it. Whew!
Does that make any sense?
Burk