I have a JavaFX scene with a stackPane. The first child (foremost) is a simple Pane to add some ImageView, the second (backmost) is a grid representing my playground. When I hover a grid case with my mouse, the case changes of color. For that, I had to set the setMouseTransparent of my Pane to true, else the grid don't take MouseEntered/Exited event. Sometime, I display an image in my Pane, and I wish could trigger an action by clicking on it but like the setMouseTransparent is true, I can't... I would like to know if there is a way to be able to do that only the children of the Pane (without this last so) can take the event !
Here my playground with a case :
And the tree of my nodes in SceneBuilder :
Thanks for your help :)