I am adding full screen detection to read the current mouse cursor position by using a timer which works but displays a warning message in the logs. Any assistance for a workaround is appreciated, thanks.
Process globals
Appstart
Log:
I use Java jdk/rne v9.0.1.
Process globals
B4X:
Dim MousePositionTimer As Timer
Dim temp,robot As JavaObject
Dim x,y As Int
Dim Lbl_PanelTopPosition As Label
Appstart
B4X:
MousePositionTimer.Initialize("MousePositionTimer", 1)
robot = temp.InitializeStatic("com.sun.glass.ui.Application").RunMethodJO("GetApplication",Null).RunMethodJO("createRobot",Null)
MousePositionTimer.Enabled = True
B4X:
Sub MousePositionTimer_tick
x = robot.RunMethod("getMouseX",Null) ' x position
y = robot.RunMethod("getMouseY",Null) ' y position
Lbl_PanelTopPosition.Text = x & " " & y
End Sub
Log:
Waiting for debugger to connect...
Program started.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by anywheresoftware.b4j.object.JavaObject (file:/C:/Dev/B4J/Libraries/JavaObject.jar) to method com.sun.glass.ui.Application.GetApplication()
WARNING: Please consider reporting this to the maintainers of anywheresoftware.b4j.object.JavaObject
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
I use Java jdk/rne v9.0.1.