JavaFX:找不到Symbol MouseEvent

时间:2017-09-29 14:13:13

标签: java class javafx mouseevent eventhandler

传递javafx库错误Cannot find Symbol MouseEvent的正确导入是什么?

示例错误:

> javac Clavier.java Touche.java Gui.java 
Touche.java:48: error: cannot find symbol
  this.setOnMouseEntered(new EventHandler<MouseEvent>(){
                                        ^
symbol:   class MouseEvent
location: class Touche

度过愉快的一天,

1 个答案:

答案 0 :(得分:0)

感谢@Berger,答案是我需要导入javafx.scene.input.MouseEvent祝你有愉快的一天!