Asghar
Asghar

Reputation: 2346

Java swing GUI TrayMenu issue on Mac OS

I have a swing application. when i close my application. It goes to tray menu and a popup message comes that my app is running in tray menu. Menu on:

On Mac when I click on OK, it again shows my GUI. I want the same effect as it is working on windows.

How can I change it? Or is there some other way to get the same effect? Or is there any other way to display message to user, like Skype notification bar. etc.?

Upvotes: 0

Views: 609

Answers (1)

Mikle Garin
Mikle Garin

Reputation: 10143

As i remember this default tray popup message behavior and there is no good way to change it. You could create your own notification, but it will be hard to determine where is tray icon positioned on the screen. I tried it some long time ago and just abandoned tray-notifications due to these problems.

The only good option (as i think) is to determine where on the screen is system toolbar positioned and show your custom notifications (based on JDialog or JWindow with alwaysOnTop mark) in some of the corners near it.

Upvotes: 3

Related Questions