ccidral/tomighty — Issue #61: Terminate gracefully when there is no system tray available
Author: ccidral
Created: 2012-02-22 11:17:45+00:00
State: open

This is to avoid errors like [this one](https://groups.google.com/forum/?fromgroups#!topic/tomighty/MOvHKgdDTH8):

```

Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: java.awt.AWTException: TrayIcon couldn't be displayed.
at org.tomighty.ui.TrayManager.run(TrayManager.java:75)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.awt.AWTException: TrayIcon couldn't be displayed.
at sun.awt.X11.XTrayIconPeer.(Unknown Source)
at sun.awt.X11.XToolkit.createTrayIcon(Unknown Source)
at java.awt.TrayIcon.addNotify(Unknown Source)
at java.awt.SystemTray.add(Unknown Source)
at org.tomighty.ui.TrayManager.run(TrayManager.java:73)
... 14 more
```