-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b45
-
generic
-
windows
-
Verified
A Java app has a TrayIcon displayed. Then it disposes all its toplevels and removes
the TrayIcon from the SystemTray. No automatic shutdown will follow.
Here's the sample code:
import java.awt.*;
import java.awt.image.*;
public class SystemTrayExitTest {
public static void main(String[] args) {
BufferedImage im = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
Graphics gr = im.createGraphics();
gr.setColor(Color.red);
gr.fillRect(0, 0, 16, 16);
TrayIcon icon = new TrayIcon(im);
icon.setImageAutoSize(true);
SystemTray.getSystemTray().add(icon);
try { Thread.sleep(2000); } catch (Exception e) {}
System.err.println("Exiting...");
SystemTray.getSystemTray().remove(icon);
}
}
###@###.### 2005-06-29 15:26:44 GMT
the TrayIcon from the SystemTray. No automatic shutdown will follow.
Here's the sample code:
import java.awt.*;
import java.awt.image.*;
public class SystemTrayExitTest {
public static void main(String[] args) {
BufferedImage im = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
Graphics gr = im.createGraphics();
gr.setColor(Color.red);
gr.fillRect(0, 0, 16, 16);
TrayIcon icon = new TrayIcon(im);
icon.setImageAutoSize(true);
SystemTray.getSystemTray().add(icon);
try { Thread.sleep(2000); } catch (Exception e) {}
System.err.println("Exiting...");
SystemTray.getSystemTray().remove(icon);
}
}
###@###.### 2005-06-29 15:26:44 GMT
- relates to
-
JDK-6285909 SystemTray doesn't have the spec how to release all of the native screen resources
-
- Open
-