当我运行我的应用程序时,我显示错误:
Caused by: java.lang.NullPointerException
at exmp.ui.UI.nodeEkle(UI.java:48)
at exmp.ui.Basic.<init>(Basic.java:47)
at exmp.MainWin.hazirla(MainWin.java:15)
at exmp.MainWin.<init>(MainWin.java:26)
at exmp.Start.start(Start.java:13)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:215)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
... 1 more
一切正常,但只有问题 nodeEkle 方法,当我调试我的应用程序时,我显示场景为空,但是如何?我在方法中创建场景;
public void gerekliUIVerileriniOlustur(){
group = new Group();
scene = SceneBuilder.create()
.root(group)
.fill(Color.BLANCHEDALMOND)
.build();
所以我尝试场景到静态>公共静态场景场景;但不工作我得到了另一个错误。所以我该如何解决这个问题..