OSX Java 系统托盘(菜单栏)

发布于 2024-09-18 16:28:06 字数 205 浏览 4 评论 0原文

有谁知道如何让应用程序(OSX 上的 Java)在系统托盘状态下运行,但当屏幕上可见窗口并具有停靠图标时?目前,我需要权衡让应用程序在托盘中运行但也显示在扩展坞中并带有菜单栏,或者(使用 plist hack)使应用程序仅在系统托盘中运行(但当显示窗口)。

我希望完全按照 Windows 上的方式工作。当没有窗口显示时在托盘中运行,但当有窗口显示时,在任务栏/超级栏中显示一项。

Does anyone know of a way to have an application (Java on OSX) run in a system tray state but when a window is visible on the screen to have a dock icon? Currently I have a trade off between having the app running in the tray but also shown in the dock and with a menu bar or to have (using the plist hack) the app running only in the system tray (but with no dock icon when a window is shown).

I wish to to work exactly how it works on Windows. Running in the tray when no window is shown but when one is, showing a item in the taskbar/superbar.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

静水深流 2024-09-25 16:28:06

Windows 和 OSX 是不同的。在 Windows 中,您可以两者兼得。

在 OSX 中,应用程序位于 Dock 中,菜单栏中有一个可选条目,或者仅位于菜单栏中。
如果你真的想要这个,你可以让它作为两个应用程序运行,一个在菜单栏中,没有窗口 - 仅当你需要一个窗口时,它才会在扩展坞中打开另一个应用程序(添加保持状态同步所需的任何通信。)

Windows and OSX are different. In Windows you can have both.

In OSX an application is in the dock with an optional entry in the menu bar or it is in the menu bar alone.
If you really want this you could have it run as two apps one in the menu bar and no window - which opens another app in the dock only when you need a Window (adding any communication needed to keep the states in sync.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文