OSX Java System Tray (menu bar)
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.
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.)
精彩评论