I'd like my program to display an icon in the TaskBar Status Area near the clock in Windows and found a way to do so.
The thing is, I'd like my program to stay open in the Status Area if the "X" is pressed on the window, but not in the System Tray, but I have no idea how to do so and searching on Google didn't help (I'm probably not searching the right terms).
Edit: I think I used the wrong terms. 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.
Press Alt + F1 and that window will minimize to the tray.
Select Start , scroll to the app you want to pin, then press and hold (or right-click) the app. Select More > Pin to taskbar. If the app is already open on the desktop, press and hold (or right click) the app's taskbar icon, and then select Pin to taskbar.
Open the Local GPO editor ( gpedit. msc ), go to the section User Configuration –> Administrative Templates –> Control Panel –> Programs, and enable the policy Hide “Programs and Features” page.
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.
Then don't use the system tray.
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);
System Tray support was added in JavaSE v 6.
you can see example here http://download.oracle.com/javase/7/docs/api/java/awt/SystemTray.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With