2

I want to use the touch-enabled controls described in http://docs.oracle.com/javase/8/javafx/user-interface-tutorial/embed.htm. I'm building my application on a Windows 8 tablet, but the ScrollPanes are desktop-style, i.e. with scrollbars and no reaction to finger-dragging. How do I tell JavaFX that I'm on a mobile platform?

Edit: I just realized that the standard, desktop-style ScrollPane does react to finger-dragging, but it doesn't look like the example one in the link above.

Solution: the features can be enabled by setting -Dcom.sun.javafx.isEmbedded=true and -Dcom.sun.javafx.touch=true

warakawa
  • 628
  • 1
  • 7
  • 14

1 Answers1

-1

There should not be a need to enable these capabilities, but JavaFX decides by itself if they are supported. You can query the capabilities programmatically, e.g. by PlatformImpl.isSupported(ConditionalFeature.INPUT_TOUCH).

JRA_TLL
  • 1,186
  • 12
  • 23