-
Bug
-
Resolution: Duplicate
-
P2
-
6
-
x86
-
linux
I am adding a tray icon to the notification area in Linux / Sol10 - GNOME. Notification area is not currently visible on the GNOME panel and so the tray icon. Now When I call SystemTray.remove() method with the tray icon instance which was added previously I am getting a NullPointerException. This is reproducible on the current PIT build on Linux AS 3.0 as well as SolarisSparc10 with GNOME.
Here is the exception:
java.lang.NullPointerException
at sun.awt.X11.XTrayIconPeer.dispose(XTrayIconPeer.java:208)
at java.awt.TrayIcon.removeNotify(TrayIcon.java:586)
at java.awt.SystemTray.remove(SystemTray.java:246)
at SystemTrayTest$ActionHandler.actionPerformed(SystemTrayTest.java:120)
at java.awt.Button.processActionEvent(Button.java:388)
at java.awt.Button.processEvent(Button.java:356)
at java.awt.Component.dispatchEventImpl(Component.java:4215)
at java.awt.Component.dispatchEvent(Component.java:4049)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:592)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:270)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:198)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:171)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:166)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:158)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:119)
Here is the PIT Build:
java version "1.6.0-awt.pit-int-awt-blade"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-awt.pit-int-awt-blade-df153228_06_May_2005_08_56-b00)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b35, mixed mode)
I have attached a sample test. Make sure you have removed the notification area from the gnome panel. Run the test. Click on the 'Remove Icon' button. You would get the above exception.
###@###.### 2005-05-10 17:02:22 GMT
Here is the exception:
java.lang.NullPointerException
at sun.awt.X11.XTrayIconPeer.dispose(XTrayIconPeer.java:208)
at java.awt.TrayIcon.removeNotify(TrayIcon.java:586)
at java.awt.SystemTray.remove(SystemTray.java:246)
at SystemTrayTest$ActionHandler.actionPerformed(SystemTrayTest.java:120)
at java.awt.Button.processActionEvent(Button.java:388)
at java.awt.Button.processEvent(Button.java:356)
at java.awt.Component.dispatchEventImpl(Component.java:4215)
at java.awt.Component.dispatchEvent(Component.java:4049)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:592)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:270)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:198)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:171)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:166)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:158)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:119)
Here is the PIT Build:
java version "1.6.0-awt.pit-int-awt-blade"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-awt.pit-int-awt-blade-df153228_06_May_2005_08_56-b00)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b35, mixed mode)
I have attached a sample test. Make sure you have removed the notification area from the gnome panel. Run the test. Click on the 'Remove Icon' button. You would get the above exception.
###@###.### 2005-05-10 17:02:22 GMT
- duplicates
-
JDK-6271569 SystemTray API requires update on some points
-
- Resolved
-
- relates to
-
JDK-6268447 PIT: TrayIcon.displayMessage() throws NPE when notification area is not available on the GNOME Panel
-
- Closed
-