Duplicate :
|
|
Relates :
|
|
Relates :
|
I am running a java app which adds a tray icon to the notification area and displays a message. When I run this on SolarisSparc10-JDS machine where notification area is not added to the panel, TrayIcon.displayMessage() throws a NullPointerException. This is incorrect. When notification area is not available on the panel, all subsequent tray icon calls must be ignored. Here is the exception: Exception in thread "main" java.lang.NullPointerException at sun.awt.X11.XTrayIconPeer.displayMessage(XTrayIconPeer.java:221) at java.awt.TrayIcon.displayMessage(TrayIcon.java:536) at SystemTrayTest.<init>(SystemTrayTest.java:91) at SystemTrayTest.main(SystemTrayTest.java:225) This is reproduced on SolarisSparc10-JDS with the following 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) Run the attached test on a system which does not have notification area added to the panel. You will get the above exception. ###@###.### 2005-05-11 07:26:10 GMT
|