0

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:

  • Windows 7/Win XP/Vista is like this
    enter image description here
  • On Mac OS it is like this.
    enter image description here

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.?

4

1 回答 1

3

我记得这个默认的托盘弹出消息行为,没有好的方法可以改变它。您可以创建自己的通知,但很难确定托盘图标在屏幕上的位置。我很久以前尝试过,由于这些问题而放弃了托盘通知。

唯一好的选择(我认为)是确定系统工具栏在屏幕上的位置,并在它附近的一些角落显示您的自定义通知(基于 JDialog 或带有 alwaysOnTop 标记的 JWindow)。

于 2012-04-20T16:42:56.127 回答