JavaFX setOnMouseClicked lambda异常

时间:2019-12-03 11:49:32

标签: java javafx

我有JavaFx类的多个imageView,而imageView中只有一个图像。

现在我在以下代码上收到NullPointerException;

imageToolCard1.setOnMouseClicked((MouseEvent e) -> getController().handle(e));

imageToolCardimageView

Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at Sagrada/nl.avans.sagrada.view.scenes.GameScene.lambda$initPlayBoard$0(GameScene.java:339)

0 个答案:

没有答案