|
Replies:
2
-
Last Post:
Sep 14, 2008 11:41 PM
by: Anton V. Tarasov
|
|
|
|
|
|
|
SystemTray prevents Swing from shutting down?
Posted:
Sep 12, 2008 9:23 AM
|
|
|
Hi,
Can anyone else reproduce this problem? It looks like something in the SystemTray code prevents Swing from shutting down once all windows are disposed.
If omit SystemTray.add(TrayIcon) from my code it shuts down fine.
Is this a known bug?
|
|
|
|
|
|
|
Re: SystemTray prevents Swing from shutting down?
Posted:
Sep 12, 2008 9:34 AM
in response to: cowwoc
|
|
|
Actually, I suspect this was done by design though I really wish the docs would mention this 
Anyway, I worked around the problem by removing the TrayIcon when the user selects "Exit".
|
|
|
|
|
|
|
|
Re: SystemTray prevents Swing from shutting down?
Posted:
Sep 14, 2008 11:41 PM
in response to: cowwoc
|
|
|
This is to support applications that live only in system tray and doesn't permanently keep windows on the screen.
AWT doesn't provide any option to prevent this behavior... In order to let the app shutdown you should remove all <TrayIcon>s.
Thanks, Anton.
swing@javadesktop.org wrote: > Hi, > > Can anyone else reproduce this problem? It looks like something in the SystemTray code prevents Swing from shutting down once all windows are disposed. > > If omit SystemTray.add(TrayIcon) from my code it shuts down fine. > > Is this a known bug? > [Message sent by forum member 'cowwoc' (cowwoc)] > > http://forums.java.net/jive/thread.jspa?messageID=299079
|
|
|
|
|