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

Mathias
  • 41
  • 3

1 Answers1

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
Ingo
  • 42,961
  • 20
  • 87
  • 207
Mathias
  • 41
  • 3