B4J Question Class in class (java.lang.NullPointerException at javafx.stage...

Tayfur

Well-Known Member
Licensed User
Longtime User
Hello;

I make picture viewer. My custom class works well.
Bu I want to FULLscreen. Therefore it calling own with fullscreen mode with external layout. But I code broken. And I cant detect it.


Sample code in attachment. (UPDATED)


Base_Resize-2
Satırda hata oluştu: 226 (Resim)
java.lang.NullPointerException
at javafx.stage.Window$9.invalidated(Window.java:885)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
at javafx.stage.Window.setShowing(Window.java:940)
at javafx.stage.Window.show(Window.java:955)
at javafx.stage.Stage.show(Stage.java:259)
at anywheresoftware.b4j.objects.Form.Show(Form.java:205)
at b4j.example.resim._showfullscreen(resim.java:1357)
at b4j.example.resim._cm_action(resim.java:1251)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:628)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA$1.run(BA.java:215)
at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
at java.lang.Thread.run(Thread.java:748)
 

Attachments

  • testFS2.zip
    417.8 KB · Views: 151
Last edited:

Tayfur

Well-Known Member
Licensed User
Longtime User
It is related to this code:
B4X:
If Width=100 And Height<=100 And Labels.Size=0 Then
       Mform.Close      
   End If
Seems like you are closing the form before it was actually created.

@Erel; I didint change code.
I changed only layout.

Before Layourt has not spans
upload_2018-12-12_17-37-40.png



after:

I added some pan TOP-LEFT-BOTTOM-RIGHT.
and it works..
Very intersting. I cant understandt this issue.
upload_2018-12-12_17-38-26.png


upload_2018-12-12_17-39-49.png
 
Upvote 0
Top