Reputation: 1174
I just wrote a desktop clock for me in java-swing and I wanted that clock to run everytime I log in.
For this I added the my jar file to start folder and I got the clock running.
But my problem is- the icon shown in the taskbar that allows me to close my application by clicking the cross mark shown at mouse over (Windows 7 style) or right click->close.
I want my application to run as the other windows processes (or desktop gadgets) and not to show the icon in the taskbar.
Thanks in advance !
Upvotes: 2
Views: 3846
Reputation: 20059
Use a JDialog instead of JFrame. Dialogs do not show in the task bar.
Upvotes: 4
Reputation: 629
I guess you might be interested in something like this
Put this code where you are creating the form
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
This disables any action on close.
Upvotes: 2
Reputation: 14853
Do the decoration of the window yourself.
http://docs.oracle.com/javase/7/docs/api/java/awt/Frame.html#setUndecorated(boolean)
See also : How do I put a Java app in the system tray?
Upvotes: 1