1

Im starting my java-application on the pi, the program works fine on my stationary computer. However, when I transfer the jar-file to the pi and start the program, I can see everything, but when I try to click anything, the cursor isnt where Im pointing with my pen. So to click a button I created, I have to click about 2 inches to the right of the actual button, then it acts as if I pressed it. To be able to access input fields, I have to click somewhere else on the screen, quite arbitrary.

Is there a problem with the LCD somehow, or can it be that I have to like reset the cursor in some way before using it? This is the display I have, from waveshare: https://www.24.se/datortillbehor/datortillbehor/raspberry-pi-tillbehor/waveshare-320x480-3-5-touch-tft-lcd-raspberry-pi?gclid=EAIaIQobChMIx_z27sKi4gIVxasYCh2NDw7PEAQYBCABEgLX0vD_BwE

1 Answer 1

3

https://www.raspberrypi.org/forums/viewtopic.php?t=121781

https://www.raspberrypi.org/forums/viewtopic.php?t=70964

https://wiki.openjdk.java.net/display/OpenJFX/Touch+screen+calibration+on+embedded+platforms

https://www.raspberrypi.org/forums/viewtopic.php?t=173993

Above are links to sources I found useful, in the end I seemed to need to add the following in parameters when I started my java program:

sudo java -Dmonocle.input.0/0/0/0.flipXY=true -Dmonocle.input.0/0/0/0.minX=200 -Dmonocle.input.0/0/0/0.maxX=6000 -Dmonocle.input.0/0/0/0.minY=3950 -Dmonocle.input.0/0/0/0.maxY=1500

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.