I want to retrieve the x and y coordinates of the current mouse position before showing a stage.
So far, the only way I found to get the mouse position in JavaFX is within a MouseEvent, which does not apply to my situation. Furthermore, I found the possibility to retrieve the position via java.awt.MouseInfo. This, however, I think is a bad idea (I use JavaFX not AWT) and, at least in my case, results in a HeadlessException.
Is there an other clean possibility to retrieve the mouse position in JavaFX without getting too hackish (e.g. simulating a MouseEvent just for getting the position)?
Thank you very much!