Java Swing - 触摸屏 - L & F
我正在为自动机开发一个基于Java(使用Swing)的触摸屏应用程序,例如这个。由于操作系统负责处理所有触摸事件,因此我只需开发一个桌面应用程序并在触摸设备上使用它即可。
如果有人可以帮助我,我将不胜感激 i) 将鼠标指针从触摸屏上移开 ii) 并且还获得与上面类似的外观和感觉(我使用 Ubuntu 作为操作系统,外观和感觉不太吸引人)
I am developing a touch screen based application in Java (using Swing) for a Automat Machine something like this. As the operating system takes care of all the touch events, I just have to develop a desktop application and use it on the touch device.
I would appreciate if some can help me
i) to remove the mouse pointer from the touch screen
ii) and also to get a Look and Feel similar to the one should above (I use Ubuntu as Operating System and the look and feel is not so attractive)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在开发一个类似的基于触摸的全屏摆动应用程序,并隐藏鼠标光标,我在主框架窗口上设置透明鼠标指针,如下所示:
至于外观和感觉,我实际上使用金属 l&f 的自定义扩展,其中我重写了ButtonUI 绘制方法来获得看起来很像您想要的 JButton。我建议你尝试做同样的事情,非常有趣而且并不那么困难。
Iam developing a similar touch based fullscreen swing app and to hide the mouse cursor iam setting a transparent mouse pointer on my main frame window as follows:
As for the look and feel iam actually using a custom extension of metal l&f where i have rewritten the ButtonUI paint method to get a JButton that look much like what you want. I would recommend you to try to do the same, is quite fun and not that difficult.