java – 将程序隐藏在Windows系统托盘中

我想我的程序在 Windows中的时钟附近的TaskBar状态区域中显示一个图标,并找到一种方法.

事情是,如果窗口上按下“X”,而不是在系统托盘中,我希望我的程序在状态区域保持打开状态,但我不知道如何这样做,并且在Google上搜索“帮助(我可能没有搜索正确的词).

编辑:我觉得我用错了条款.我知道如何在通知区域中显示程序的图标,我希望将其隐藏在最小化窗口时通常显示的区域.

解决方法

I kNow how to have my program’s icon in the notification area,what I’d like is to hide it in the area where it is normally displayed when you minimize a window.

然后不要使用系统托盘.

The thing is,I’d like my program to stay open in the Status Area if the “X” is pressed on the window,

frame.setDefaultCloSEOperation(JFrame.HIDE_ON_CLOSE);

相关文章

Java中的String是不可变对象 在面向对象及函数编程语言中,不...
String, StringBuffer 和 StringBuilder 可变性 String不可变...
序列化:把对象转换为字节序列的过程称为对象的序列化. 反序...
先说结论,是对象!可以继续往下看 数组是不是对象 什么是对...
为什么浮点数 float 或 double 运算的时候会有精度丢失的风险...
面试题引入 这里引申出一个经典问题,看下面代码 Integer a ...