1

How to get the correct location of a Scene after it has been replaced in the Stage?

view story
linux-howto

http://stackoverflow.com – I know this is normally not necessary, but for my testing framework, I need to be able to replace the Scene used by my Stage (this is necessary because I don't want to just fork a new JVM for every single test and obviously, we can't restart a JavaFX Application, at least not in JavaFX 2). However, this breaks my tests because after doing this, the Scene starts reporting an incorrect location (so I cannot find my Nodes absolute position on the screen). Here's complete code reproducing the problem. I believe this is a bug in JavaFX, but I would like to know if anyone can see any problem first (HowTos)