javagraphics2dframebuffer

Unwanted cursor with Java2D drawing directly to framebuffer


The environment is Java 11 on a Raspberry Pi 3B+ with a 3.5" touchscreen. The program writes directly to the framebuffer with the aid of Thomas Welsch's JavaFrameBuffer JNI support.

Things work as expected, except that a blinking cursor appears on the screen after drawing some text. This app uses no input except screen touches, so a cursor is irrelevant and visually disturbing.

How can I get rid of it?

Please note that no Component is present, so there is no setCursor method available.


Solution

  • The problem is that the lack of a component prohibits the easiest way of hiding the cursor with setCursor.

    I tried the following in the cmdline.txt:

    vt.global_cursor_default=0
    

    (do not forget to reboot ^^)