是否可以在 windows 平板电脑上使用鼠标侦听器?

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

有人要求我为一个儿童寻宝电视节目编写一个应用程序。这是一个非常简单的应用程序,所有的事情都是这样的:应用程序显示一张宝箱的图片。当 child 点击宝箱时,它会变成几种可能的配料图片之一(例如鱼或鸡或其他东西),然后在第二次点击时它会显示一顿饭的食谱并且孩子有做到这一点。不过,他们需要为 Windows 平板电脑制作它,而且由于我没有平板电脑,所以我无法测试我的应用程序。

我的问题是:我是在 Java 上完成的(使用 awt 和 paintComponent 方法以及鼠标侦听器在单击时更改)并且由于平板电脑 运行 windows,我可以使它成为可执行文件并直接放在平板电脑上吗?触摸会像鼠标一样吗?或者,如果我要加入触摸功能,我的代码是否需要完全不同?如果我的路线完全错误,那么我应该使用哪些语言为 windows 平板电脑编写代码?

取决于平板电脑。以下是 oracle 网页的引述:

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.

还有 link.

如果平板电脑支持 java,它应该可以正常工作,包括点击事件。 您也可以使用 Launch4j which is free or you can make windows like installer using tool called Advanced Installer 将 jar 打包为 exe,但它不是免费的。

希望我有所帮助。