When the program starts, this error crashes and nothing starts:

java.lang.ClassCastException: javafx.graphics@10.0.2/javafx.scene.layout.AnchorPane cannot be javafx.graphics@10.0.2/javafx.scene.layout.BorderPane at application.Main.start (Main.java :14)

javafx. /com.sun.javafx.application.PlatformImpl.lambda$runLater$9(Unknown Source) at java.base / java.security.AccessController.doPrivileged (Native Method) at javafx.graphics/com.sun.javafx.application.PlatformImpl. lambda $ runLater $ 10 (Unknown Source) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source) at java.base / java.lang.Thread.run (Unknown Source)

    1 answer 1

    changed in the class Main.java in the start method the BorderPane object to AnchorPane , because it made the same change in SceneBuilder