Mouse Events get Ignored on the Underlying Layer

前端 未结 2 1492
广开言路
广开言路 2020-11-27 05:34

I have two layers (= AnchorPanes) stacked one of the other with a StackPane. So both layer fill the whole scene. The problem is, that only the top layer receives mouse event

2条回答
  •  无人及你
    2020-11-27 06:01

    This cant work becouse the Event is catched by LayerB. You can set LayerB to MouseTransparent

    layerB.setMouseTransparent(true)
    

    But im not sure that button b is mousetranparent too after this.

    Just give it a try, ohterwise do you thoughts about a different layout.

提交回复
热议问题