Search code examples
javawindowstouchtablet

Is it possible to use a mouse listener on a windows tablet?


I've been asked to write an app for a kid's treasure hunt TV show. It's a very simple app, all that happens is this: the app displays a picture of a treasure chest. When the child taps the treasure chest, it changes to one of a few possible pictures of an ingredient (like a fish or chicken or something), then on the second tap it shows a recipe for a meal and the kid has to make it. They need it to be made for Windows tablets though, and since I don't have one I have no way of testing my apps.

My question is this: I made it on Java (using awt and the paintComponent method and a mouse listener to change on click) and since the tablets run windows, can I make it an executable and put it straight on the tablet and would the touch behave like a mouse? Or would my code need to be completely different if I'm incorporating touch? If my route is completely wrong, then which languages should I use to write code for windows tablets?


Solution

  • Depends on te tablet. Here is the quote from oracle's web page:

    Is the Java download available for the Windows Surface tablet? No, since the Windows Surface tablet does not support the Java plug-in, Java cannot be installed on the Surface tablet. Only the apps available in the Windows Store can be installed on Windows Surface that uses Windows RT or Windows RT 8.1 operating system.

    And the link.

    If the tablet supports java it should work just fine including click events. You can also pack jar to exe using Launch4j which is free or you can make windows like installer using tool called Advanced Installer but its not free.

    Hope i helped.