I'm working on a slide menu for JavaFX, and in the definition of it I constantly make use of the
method for referencing the height and width of the scene to which the node is added.
The problem is that the slide menu is defined before the scene does, returning a
I think that a workaround for this would be creating a
with a listener that each time that the value of the property changes, would check if it's
, executing the lines of code that involve a call to the
method or not, respectively.
How could I achieve this? I thought that I could do this by saying
BooleanProperty hasScene = new SimpleBooleanProperty();
but it's not possible to cast from
Any idea? Thanks in advance!