B4J Question Telephone entry plus other Masked edits

Colin Evans

Active Member
Licensed User
Longtime User
Been scouring the forum for any examples for input on textfields using a masking, i.e. Telephone number only excepting numbers and setting a mask like (#####) ######

I have looked at the Antares entry from the forum but can't get it to run, error

Can any one point me in the right direction, please

B4X:
tmask._measuretext (java line: 689)
java.lang.ClassNotFoundException: javafx$scene$text$TextBuilder
    at anywheresoftware.b4j.object.JavaObject.getCorrectClassName(JavaObject.java:289)
    at anywheresoftware.b4j.object.JavaObject.InitializeStatic(JavaObject.java:75)
    at b4j.example.tmask._measuretext(tmask.java:689)
    at b4j.example.tmask._setcaret_pos(tmask.java:884)
    at b4j.example.tmask._smask(tmask.java:963)
    at b4j.example.tmask._initialize(tmask.java:343)
    at b4j.example.main._appstart(main.java:90)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
    at b4j.example.main.start(main.java:37)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
    at java.base/java.lang.Thread.run(Thread.java:834)
 

Colin Evans

Active Member
Licensed User
Longtime User
Hi Chris, many thanks for taking the time to answer, the jTextFormatter is an alternative, cheers
 
Upvote 0
Top