I have a machine with HiDPI display and Ubuntu 15.10 installed.
Setting the scaling factor to 1, I run the following simple test:
import java.awt.*;
import java.awt.image.BufferedImage;
public class TryTray {
static TrayIcon icon;
public static void main(String args[]) throws Exception {
if (! SystemTray.isSupported()) {
System.out.println("tray is not supported");
return;
}
SystemTray tray = SystemTray.getSystemTray();
icon = new TrayIcon(new BufferedImage(20, 20, BufferedImage.TYPE_INT_RGB), "Bimm Bomm");
tray.add(icon);
}
}
It works as expected: a black square of an icon is painted in the tray area.
Now set the factor to 2 and rerun the test: no icon is visible any more.
Running the test like java/awt/TrayIcon/TrayIconEvents/TrayIconEventsTest.java I'm getting the coordinates of the icon. Having the screen width 3000, it reports some 2500 but doesn't paint anything visible.