Swing 应用程序中的 SWT 托盘图标
Java 1.6 中的托盘图标实现有其局限性,例如不支持图形图标中的 Alpha 通道。有人尝试过使用 SWT 来支持原生的托盘图标吗?这可能吗?
The tray icon implementation in Java 1.6 has its limitations, e.g. no support for the alpha channel in the graphic icons. Did anybody tried to use SWT to support a native looking tray icon? Is that possible at all?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,我尝试了一下:它在 Windows 上工作正常,但在 Linux 上,一旦我关闭
JFrame
或JDialog
,它就会崩溃。看起来 SWT 对其 Linux 实现上的 AWT windows 感到困惑。OK, I gave it a try: it works fine on Windows but on Linux it crashes as soon as I close a
JFrame
orJDialog
. It looks like SWT gets confused by the AWT windows on its Linux implementation.我认为您只需使用本机调用 - 我怀疑 SWT 届时会为您做很多事情。
I would think that you'd just use native calls - I doubt that SWT would be doing much for you at that point.