java - Swing: Steal focus from other apps (usability in OS X) -
I have an application in java swing
that runs most of the time in the system tray. Users can use the tray menu
to do a number of tasks. One of those tasks is to show an app window. I have the issue with the applicability on OS X.
In the window , if the user brings an app window and switches to another app later, they can go back to their application Taskbar using. But in OS X, the app runs in a mode in which the app does not have a menu and it will not appear in the command + tab
list.
__LSUIElement
info.plist file
< back until you click on the window (which may be behind many other windows). The simplest way is that the user will have to open the window again using the tray icon, but since the window is already open, I am unable to bring it.
So, how can I focus away from other applications and bring my window to the front?
Edit:
My issue is running as an agent '/ strong>. I have to work already. I have this issue when I have received my program window at the top. I am unable to do this in java.
You can specify a true
parameter when the user clicks the icon in the menu bar (Or you open the window). However, you have to hook in Cocoa from Java.
Comments
Post a Comment