Tray Icon not working on Ubuntu 16.04
<p>I ran into an Issue with Java awt tray icons under Ubuntu Gnome 16.04:</p>

<p>The Icon is displayed in the top left corner of my screen and in the System Tray appears a black square. The MouseListener is also not working (neither on the icon nor on the black square).</p>

<p><a href="https://i.stack.imgur.com/Q6AZd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q6AZd.png" alt="Icon in the top left corner"></a></p>

<p><a href="https://i.stack.imgur.com/KjoPW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KjoPW.png" alt="System Tray"></a></p>

<p>Here is my Code:</p>

<pre><code>if (SystemTray.isSupported()) {
   Image image = ImageIO.read(EyeUNIFYlocal.class.getResource("/star.png"));
   TrayIcon trayIcon = new TrayIcon(image);
   trayIcon.setImageAutoSize(true);

   trayIcon.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent e) {
         System.out.println("Clicked");
      }
   });
   try {
      SystemTray.getSystemTray().add(trayIcon);
   } catch (AWTException ex) {
      System.err.println("Error while creating tray icon.");
   }
} else {
   System.err.println("Tray icons are not supported on this System.");
}
</code></pre>

<p>This code works fine on Windows 10.</p>

<p>Thank you in advance!</p>