Java – hide the program in the windows system tray

I want my program to display an icon in the taskbar status area near the clock in windows and find a way

The thing is, if I press "X" on the window instead of in the system tray, I want my program to remain open in the status area, but I don't know how to do so, and I search Google for "help" (I may not search for the correct word)

Editor: I think I used the wrong terms I know how to display the program icon in the notification area. I want to hide it in the area normally displayed when minimizing the window

Solution

Then do not use the system tray

frame.setDefaultCloSEOperation(JFrame.HIDE_ON_CLOSE);
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>