2

I have a javafx application to be deployed in android, I have a textfield in it, but instead of showing the default keyboard(letters,numbers,symbols), I just want to display numeric keypad. How to do it?

Walker
  • 307
  • 4
  • 15

1 Answers1

0

If you have a TextField, you can call:

text.getProperties().put("vkType", "numeric");

Note that you need to use -Dcom.sun.javafx.isEmbedded=true -Dcom.sun.javafx.virtualKeyboard=javafx to make it work.

Wim Deblauwe
  • 25,113
  • 20
  • 133
  • 211