JavaFX 21 TextField and Japanese input

52 Views Asked by At

I have a Java 21 desktop application with JavaFX and I want to support Japanese text input. No problem I guess with a Japanese keyboard, but I have problems (on Mac OS X) with keyboard emulation. I mean the かな assisted input like in the attached image:

Japanese romaji input.

I would expect the input of japanese kana / kanji to happen normally, but it is instead erratic and it does not always work. Also, when browsing suggestions and clicking on one of them a message like "java[61157:14017992] Warning: Window move completed without beginning" is written on text output / error. Heh?

Has anyone faced the same issues?

With Windows IME input works better, but it's somehow peculiar how - normally - the japanese characters would appear directly in the text area / input field, while with JavaFX input fields the assisted input produces an additional tiny "window" with a preview of the japanese characters, and a confirm button. You must first enter the romaji from keyboard, choose the desired japanese characters in the windowlet and THEN have them in the text field. It works, though...

I wander if there's some catch with focus / events (my TextField is plain vanilla with no custom event handlers whatsoever anyway).

0

There are 0 best solutions below